Adeodato Simó [Fri, 29 Feb 2008 18:26:53 +0000 (19:26 +0100)]
Allow colons in URLs after the first slash
A new regexp fixes this bug:
http://ikiwiki.info/bugs/No_link_for_blog_items_when_filename_contains_a_colon/
I traced this down to htmlscrubber. If disabled,
it works. If enabled, then $safe_url_regexp
determines the URL unsafe because of the colon and
hence removes the src attribute.
Digging into this, I find that RFC 3986 pretty
much discourages colons in filenames:
"""
A path segment that contains a colon character
(e.g., "this:that") cannot be used as the first
segment of a relative-path reference, as it would
be mistaken for a scheme name. Such a segment must
be preceded by a dot-segment (e.g., "./this:that")
to make a relative- path reference.
"""
on the other hand, with usedirs, any link to
another page will be prepended by ../ anyway, so
that makes them okay again.
The solution still seems not to use colons.
In any case, htmlscrubber should get a new regexp,
courtesy of dato.
I have tested and verified this.
Signed-off-by: martin f. krafft <madduck@madduck.net>
Joey Hess [Sun, 24 Feb 2008 22:58:25 +0000 (17:58 -0500)]
per Brian May, change monotone historyurl
> This doesn't work in currently released versions of viewmtn (it was
> meant to), but has been fixed in the development repository. I imagine
> it won't be long until the next release.
Joey Hess [Sun, 24 Feb 2008 21:37:11 +0000 (16:37 -0500)]
Fix links generated by preprocessor directives when previewing.
As was already done for linkfication, links generated in a prevew page
are relative to the top of the wiki, so it has to be told that the destpage
is there.
I was using "" to indicate this, but that may confuse some preprocessor
plugins, which treat parameters with an empry value specially (sparkline is one
such). Instead, use "/", which is more accurate anyway and works just as well.
Joey Hess [Sun, 24 Feb 2008 20:36:25 +0000 (15:36 -0500)]
* Fix another preview will_render bug. This one involved inline,
which forced a scan of the page to make available metadata that
appeared after the inline directive. Problem is that scan made it forget
about any other files rendered due to the page. The scan also turns out
to be unnecessary now, since meta persistently stores state and it's
always available. So it was just removed.
Joey Hess [Wed, 20 Feb 2008 21:45:02 +0000 (16:45 -0500)]
* tla: Remove call to escapeHTML when constructing recentchanges message;
the html is escaped at a different level. Closes: #466495
* bzr, mercurial: Remove unused import of escapeHTML.
Joey Hess [Thu, 14 Feb 2008 20:42:14 +0000 (15:42 -0500)]
* Preview limits the page dropdown to what's selected previously
(as preserving the full list across preview would be tricky). Userdirs
were still being offered as an option there, remove them.
* Fix a bug where user A created a page concurrently with user B, and
when B previewed it would redirect B to A's new page, losing B's work.
Instead, don't redirect and let conflict handling resolve it.
Joey Hess [Thu, 14 Feb 2008 20:20:49 +0000 (15:20 -0500)]
* The search plugin needs to override <base> to point to the directory
containing ikiwiki.cgi, but this should not change the urls to the style
sheets etc. Add a new forcebareurl parameter to misctemplate to allow
it to do that.