[Home]WikiBugs/SplitUrlPunct

UseModWiki | WikiBugs | RecentChanges | Preferences

The following doesn't work correctly:

  http://www.usemod.com?x=<y>

being expanded to:

  http://www.usemod.com?x=<y>;

--LaurensPit

This is a difficult case. The wiki translation process first translates the < character to &lt; and the > character to &gt;. The reason this step is first (right after HTML region checking) is to avoid possible HTML-security problems that could be caused by people creating their own tags.

In a later step the parser sees the URL http://www.usemod.com?x=&lt;y&gt; (shown here in nowiki tags). The ; at the end is considered punctuation and is separated from the URL.

One possible change would be to remove the semicolon character (;) from the list of trailing punctuation--this would mean that text like http://www.yahoo.com/foo; would change to include the ; in the URL. Given the rare use of ; characters immediately following URLs this wouldn't make much difference. The change would also allow character references to be the last character of a URL.) Any opinions on this idea?

In the meantime, you can use http://www.usemod.com?x=<y>"" which looks like http://www.usemod.com?x=<y> (the double-quotes override any trailing-punctuation decisions). --CliffordAdams

The text above was written in late 2001. As of August 2003, I have decided not to change the current behavior, mostly because I don't want to break existing pages. In addition to the "" workaround, one can also use bracketed URLs like [http://www.usemod.com?x=<y> Test Link] (rendered as [Test Link]). --CliffordAdams


UseModWiki | WikiBugs | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited November 26, 2007 11:24 am by MarkusLude (diff)
Search: