Menu

#4188 2 hyphens in URL get mangled into em dash

open
nobody
None
5
2008-08-21
2008-08-21
No

In this story, http://slashdot.org/article.pl?sid=08/08/21/028210, the correct URL to the linked article is "http://blog.wired.com/27bstroke6/2008/08/watch-listed--1.html." This URL is odd, at least unusual, because it has two adjacent hyphens.

In signing off on this story, I clicked on the link, and instead got a 404 error, because the story was actually linking to "http://blog.wired.com/27bstroke6/2008/08/watch-listed%E2%80%941.html" (with an em dash where the two hyphens should have been).

The original submission has the em dash in that spot as well, http://blog.wired.com/27bstroke6/2008/08/watch-listed — 1.html. However, it seems that this is not the submitter's fault, but some pre-processing between hitting "submit" / "preview" and the editor's view of the same submission.

I tested by entering the following snippet as a new submission:

"This is a test. I want to know if this story will show up with its doubled em dashes intact!

http://blog.wired.com/27bstroke6/2008/08/watch-listed--1.html

Also, I'm going to try it <a href="http://blog.wired.com/27bstroke6/2008/08/watch-listed--1.html">as a link</a>."

I tried previewing this as both HTML Formatted, and Plain Old Text. In both cases, the doubled hyphens were changed to em dashes with spaces on either side.

I like auto-replacment of most doubled hyphens, but in URLs like this one, it breaks them.

Tim

Discussion


Log in to post a comment.