What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

System: Mac OS X, Browser: Firefox 15.0.1 (what other information is needed?).

&#211hello; produces Óhello; in the Preview. Similarly with hex: &#x211bhello; produces ℛhello;

(They render correctly when posted.)

share|improve this question
    
What's the problem anyway? What do you expect them to look like? –  SingerOfTheFall Sep 13 '12 at 13:22
    
@SingerOfTheFall Sorry, thought that was obvious. &#211hello; should render as &#211hello; since it is not a valid entity. –  Loop Space Sep 13 '12 at 13:23
    
@SingerOfTheFall: They are invalid entities (&#xxx; is the proper format, where xxx is a decimal number). –  Martijn Pieters Sep 13 '12 at 13:24
    
What is interesting is that an extra ; is being implied by the preview. The problem, of course, is that this 'eager fixing' is going to hide your error until you submit your post. –  Martijn Pieters Sep 13 '12 at 13:25

1 Answer 1

Part of the responsibility falls on the browser, which I believe shouldn't technically do what it's doing by pretending there was a ; there.

That said, there's no reason that PageDown can't use the same level of strictness in its ampersand encoding that MarkdownSharp does, so updating _EncodeAmpsAndAngles to use

/&(?!#?[xX]?(?:[0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);)/g

instead of the more lenient

/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g

seems reasonable enough to me.

share|improve this answer
    
I guess the real bug (from SO/SE perspective) is that there is a difference between preview and what eventually gets rendered so I agree that PageDown should use the same encoding whatsit as MarkdownSharp. –  Loop Space Sep 13 '12 at 13:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .