chiark / gitweb /
mason/pastebin/, static/odin.css: Cope if client doesn't send cookies.
[odin-cgi] / mason / pastebin / %show
index b8dc06951eb54185f60830643b6b019764687980..7668de7cc6c6aa166bad9b8927868e9e258ae4fb 100644 (file)
@@ -2,11 +2,22 @@
        title => Odin::escapify($m, $title) . " (odin.gg Paste Bin)" &>
 <h1><tt>odin.gg</tt> Paste Bin: <% $title %></h1>
 <div class="menu">
-  <span class="item"><a href="<% "$Odin::PASTEBIN/$tag?op=raw" %>">Raw</a></span>
+  <span class="item"><a href="<% "$Odin::PASTEBIN/$tag?op=raw" |h %>">Raw</a></span>
 % if (defined $edit) {
-  <span class="item"><a href="<% "$Odin::PASTEBIN/$tag?edit=$edit" %>">Edit</a></span>
+  <span class="item"><a href="<% "$Odin::PASTEBIN/$tag?edit=$edit" |h %>">Edit</a></span>
 % }
 </div>
+% if (defined $honc) {
+<div class="note">
+<p>Your browser doesn't appear to be accepting my cookies.
+<p>Don't share the link to this page with other people.  <b>If you do,
+  they'll be able to edit this paste just as you can</b>, using the
+  <b>Edit</b> link at the top of the page.
+<p>Instead, share this link:
+  <a href="<% "$Odin::PASTEBIN/$tag" |h %>"><%
+    "$Odin::PASTEBIN/$tag" |h %></a>
+</div>
+% }
 <pre class="paste">
 % if ($lang eq 'txt') {
 <% $content |h %>\
@@ -34,6 +45,7 @@
        $title
        $lang
        $tag
+       $honc
        $edit
 </%args>
 %#