tea.mathoverflow.net - Discussion Feed (HTML entities in comments) 2018-11-04T13:07:47-08:00 http://mathoverflow.tqft.net/ Lussumo Vanilla & Feed Publisher Andrew Stacey comments on "HTML entities in comments" (11932) http://mathoverflow.tqft.net/discussion/841/html-entities-in-comments/?Focus=11932#Comment_11932 2010-12-16T00:07:08-08:00 2018-11-04T13:07:47-08:00 Andrew Stacey http://mathoverflow.tqft.net/account/4/ In reply to Scott's post: If anyone want to point me to a good discussion of this, or explain that there is in fact a canonical resolution of this problem, I'd love to hear. Maybe I've just ... In reply to Scott's post:

If anyone want to point me to a good discussion of this, or explain that there is in fact a canonical resolution of this problem, I'd love to hear.

Maybe I've just gotten so used to the Markdown way of doing this that I can't see its drawbacks, but it does seem to work fine and I don't tend to get caught out by this. The rule is quite simple: if it looks like an entity, it is an entity. If it doesn't look like an entity, it isn't. Thus if I write α then Markdown correctly lets that through to produce α, but if I write & or &hello or & ; then Markdown correctly escapes the ampersand to produce &hello and & ;.

The real problem with HTML entities in comments is that it is different to what happens in answers, thus violating the "Principle of Least Surprise".

]]>
Scott Morrison comments on "HTML entities in comments" (11915) http://mathoverflow.tqft.net/discussion/841/html-entities-in-comments/?Focus=11915#Comment_11915 2010-12-15T13:00:24-08:00 2018-11-04T13:07:47-08:00 Scott Morrison http://mathoverflow.tqft.net/account/3/ Doh! :-) Doh! :-)

]]>
Anton Geraschenko comments on "HTML entities in comments" (11913) http://mathoverflow.tqft.net/discussion/841/html-entities-in-comments/?Focus=11913#Comment_11913 2010-12-15T10:34:54-08:00 2018-11-04T13:07:47-08:00 Anton Geraschenko http://mathoverflow.tqft.net/account/2/ @Scott: You probably meant to say “without having to write &”. That's what he wrote, but this forum converted it to an &. He should have written & or ...

@Scott: You probably meant to say “without having to write &”.

That's what he wrote, but this forum converted it to an &. He should have written & or `&`. :-)

]]>
Mike Shulman comments on "HTML entities in comments" (11912) http://mathoverflow.tqft.net/discussion/841/html-entities-in-comments/?Focus=11912#Comment_11912 2010-12-15T09:40:29-08:00 2018-11-04T13:07:47-08:00 Mike Shulman http://mathoverflow.tqft.net/account/80/ @Scott: That sounds reasonable, but why does it work fine in questions and answers, but not in comments? @Scott: That sounds reasonable, but why does it work fine in questions and answers, but not in comments?

]]>
Harald Hanche-Olsen comments on "HTML entities in comments" (11911) http://mathoverflow.tqft.net/discussion/841/html-entities-in-comments/?Focus=11911#Comment_11911 2010-12-15T09:03:17-08:00 2018-11-04T13:07:47-08:00 Harald Hanche-Olsen http://mathoverflow.tqft.net/account/18/ @Scott: You probably meant to say “without having to write &”. @Scott: You probably meant to say “without having to write &”.

]]>
Scott Morrison comments on "HTML entities in comments" (11910) http://mathoverflow.tqft.net/discussion/841/html-entities-in-comments/?Focus=11910#Comment_11910 2010-12-15T08:04:33-08:00 2018-11-04T13:07:47-08:00 Scott Morrison http://mathoverflow.tqft.net/account/3/ @Mike, it's probably not a desired behavior. It's worth remembering that handling HTML entities in user entered text is complicated, and I don't think there's a canonical way to do it. The problem, ... @Mike, it's probably not a desired behavior. It's worth remembering that handling HTML entities in user entered text is complicated, and I don't think there's a canonical way to do it. The problem, of course, is that humans want to type ampersands in their plain text (and in the LaTeX!) without having to write &. In proper HTML string, bare ampersands like this would never appear.

Thus if you're rendering a chunk of human entered text, you need to come up with some rule for deciding which ampersands are "literal" and which are the beginnings of HTML entities.

If anyone want to point me to a good discussion of this, or explain that there is in fact a canonical resolution of this problem, I'd love to hear.

]]>
WillieWong comments on "HTML entities in comments" (11909) http://mathoverflow.tqft.net/discussion/841/html-entities-in-comments/?Focus=11909#Comment_11909 2010-12-15T06:01:55-08:00 2018-11-04T13:07:47-08:00 WillieWong http://mathoverflow.tqft.net/account/288/ @Andrew: ooh... shiny! @Andrew: ooh... shiny!

]]>
Andrew Stacey comments on "HTML entities in comments" (11907) http://mathoverflow.tqft.net/discussion/841/html-entities-in-comments/?Focus=11907#Comment_11907 2010-12-15T02:07:53-08:00 2018-11-04T13:07:47-08:00 Andrew Stacey http://mathoverflow.tqft.net/account/4/ Don't forget about my little script which converts LaTeX code to HTML entities: http://www.math.ntnu.no/~stacey/code/latexToUTF/utf.php Don't forget about my little script which converts LaTeX code to HTML entities:

http://www.math.ntnu.no/~stacey/code/latexToUTF/utf.php

]]>
Harald Hanche-Olsen comments on "HTML entities in comments" (11906) http://mathoverflow.tqft.net/discussion/841/html-entities-in-comments/?Focus=11906#Comment_11906 2010-12-15T00:28:16-08:00 2018-11-04T13:07:47-08:00 Harald Hanche-Olsen http://mathoverflow.tqft.net/account/18/ It might be worth your time learning how to type the needed characters directly. I expect this will become more and more useful as Unicode slowly gains a more solid foot hold in the world. It might be worth your time learning how to type the needed characters directly. I expect this will become more and more useful as Unicode slowly gains a more solid foot hold in the world.

]]>
Mike Shulman comments on "HTML entities in comments" (11905) http://mathoverflow.tqft.net/discussion/841/html-entities-in-comments/?Focus=11905#Comment_11905 2010-12-14T19:42:19-08:00 2018-11-04T13:07:47-08:00 Mike Shulman http://mathoverflow.tqft.net/account/80/ When writing a question or answer, I often try to use HTML entities when possible instead of mathjax, since they don't take time to render. But this doesn't seem to work when writing a comment; in ... When writing a question or answer, I often try to use HTML entities when possible instead of mathjax, since they don't take time to render. But this doesn't seem to work when writing a comment; in that case HTML entities get escaped and thus don't show the way I want. Is that a known and desired feature?

]]>