‐ being rendered as hyphen in preview

(Burke) #1

This is a (sub-)trivial issue, but I stumbled upon the fact that then non-entity ‐ behaves differently in the post preview than in Discourse.

In a draft post:

check out this ‐

Seen in the preview:

check out this -

Once submitted:

check out this ‐

While it may be a convenient entity, I don’t believe ‐ is a standard HTML entity (most sites suggest - if you need an entity for a hyphen), so the post preview should probably not be converting ‐ to a hyphen.

Just in case someone is really bored and looking for a “bug” to fix. Then again, the preview rendering may be handled by a separate library and them’s the breaks. :wink:

(Jeff Atwood) #2

There is already a bug on this, as I recall it is deep in the bowels of the randomly Japanese named XML / HTML processor we are using. I can’t recall its name at the moment, perhaps @sam can.

Pick your poison


(cpradio) #3

IIRC it may be nokogiri

(Jeff Atwood) #4