aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-12-31 20:50:22 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-12-31 20:50:22 +0000
commitc494e2f97461b5b524607cef88657e0bb89add25 (patch)
tree1180ad77ab9ad10b4cbbba61ed71e0af1368aeba
parent552e1f852a3f578e4195c55a67a7cfb74524af65 (diff)
downloadikiwiki-c494e2f97461b5b524607cef88657e0bb89add25.tar
ikiwiki-c494e2f97461b5b524607cef88657e0bb89add25.tar.gz
* Escape shashes in page titles entered in the blog post form.
* Munge openids of the form somehost.com/user (trial, may revert)
-rw-r--r--IkiWiki/CGI.pm5
-rw-r--r--debian/changelog4
-rw-r--r--doc/bugs/Convert___34__somehost.com/user__34___OpenID_at_RecentChanges_page.mdwn9
3 files changed, 16 insertions, 2 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 7f84f345a..83ed959c0 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -634,6 +634,7 @@ sub cgi (;$$) { #{{{
}
elsif ($do eq 'blog') {
my $page=titlepage(decode_utf8($q->param('title')));
+ $page=~s/(\/)/"__".ord($1)."__"/eg; # escape slashes too
# if the page already exists, munge it to be unique
my $from=$q->param('from');
my $add="";
@@ -665,6 +666,10 @@ sub userlink ($) { #{{{
if ($display !~ /\[/) {
$display=~s/^(.*?)\.([^.]+\.[a-z]+)$/$1 [$2]/;
}
+ # Convert "somehost.com/user" to "user [somehost.com]".
+ if ($display !~ /\[/) {
+ $display=~s/^(.+)\/[^\/](.+)$/$2 [$1]/;
+ }
$display=~s!^https?://!!; # make sure this is removed
return "<a href=\"$user\">".escapeHTML($display)."</a>";
}
diff --git a/debian/changelog b/debian/changelog
index 0735c2db7..622b8f8d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,8 +23,10 @@ ikiwiki (1.37) UNRELEASED; urgency=low
* If a userdir is configured, links to pages in it can be made without
specifying the path. This allows for easy signing of comments by linking
to your page in the userdir.
+ * Escape shashes in page titles entered in the blog post form.
+ * Munge openids of the form somehost.com/user (trial, may revert)
- -- Joey Hess <joeyh@debian.org> Fri, 29 Dec 2006 00:26:47 -0500
+ -- Joey Hess <joeyh@debian.org> Sun, 31 Dec 2006 15:30:59 -0500
ikiwiki (1.36) unstable; urgency=low
diff --git a/doc/bugs/Convert___34__somehost.com/user__34___OpenID_at_RecentChanges_page.mdwn b/doc/bugs/Convert___34__somehost.com/user__34___OpenID_at_RecentChanges_page.mdwn
index efb71e725..99c06d860 100644
--- a/doc/bugs/Convert___34__somehost.com/user__34___OpenID_at_RecentChanges_page.mdwn
+++ b/doc/bugs/Convert___34__somehost.com/user__34___OpenID_at_RecentChanges_page.mdwn
@@ -5,6 +5,9 @@ Could you also please convert "somehost.com/user" OpenID to
for "user.somehost.com" OpenIDs. I think that same display form
for all OpenIDs is a good idea. What's your opinion?
+> It's probably ok to do this, although there's the potential it might
+> misfire on some url. I've implemented it on a trial basis. --[[Joey]]
+
BTW, Happy New Year for you and Debian 'etch' and all ikiwiki
users! :) --Pawel
@@ -15,5 +18,9 @@ users! :) --Pawel
>>> Sorry for confusing! I meant two files (directory and page),
>>> instead of one (page).
+>>>> Yep, fixed. --[[Joey]]
+
>>> BTW, I have some problems with singing in using getopenid.com
->>> server, so I also use myopenid.com server :) --Pawel \ No newline at end of file
+>>> server, so I also use myopenid.com server :) --Pawel
+
+>>>> They were having some glitches last week.. --[[Joey]]