Apparently (I'm guessing) the raw HTML is emitted as ...cscott.net".
And the URL autolinker snarfs up the " into the URL but leaves the ; on the floor, resulting in <a href="...cscott.net"">...cscott.net"</a>; and then HTML helpfully fills in the missing semicolons on the entities, leaving the trailing semicolon stranded.
Dunno what the best fix is here. Teach the URL autolinker about quoted strings, and if the URL starts with " then kick a " out of the end of it? That's roughly how parentheses are handled, I think...
Technically the autolinker shouldn't break the entity, so if it grabs the " part it should gobble up the semicolon as well. Ie semicolon shouldn't be a stop character after an ampersand. But that would still lead to issues, since I don't actually want the trailing quote included in the URL. But if it decoded entities before looking for stop characters, that would probably work. The rules for interpreting & in URLs are tricky, though...
This is probably incidentally fixed by Torgen#412 which replaced the cleanup logic that generated a SafeString of HTML with parsing chunks out of the raw text that are rendered with Template.dynamic.
response is:
Note the trailing semicolon.
Apparently (I'm guessing) the raw HTML is emitted as
...cscott.net".
And the URL autolinker snarfs up the
"
into the URL but leaves the;
on the floor, resulting in<a href="...cscott.net"">...cscott.net"</a>;
and then HTML helpfully fills in the missing semicolons on the entities, leaving the trailing semicolon stranded.Dunno what the best fix is here. Teach the URL autolinker about quoted strings, and if the URL starts with " then kick a " out of the end of it? That's roughly how parentheses are handled, I think...
Technically the autolinker shouldn't break the entity, so if it grabs the
"
part it should gobble up the semicolon as well. Ie semicolon shouldn't be a stop character after an ampersand. But that would still lead to issues, since I don't actually want the trailing quote included in the URL. But if it decoded entities before looking for stop characters, that would probably work. The rules for interpreting & in URLs are tricky, though...