Entity escaping



  • Continuing the discussion from The 'Work Around Discourse Bullshit' thread (2):

    @HardwareGeek said:

    I disagree. ℵ0 is countable, in theory anyway; actually counting it is a bit problematic.

    I typed the entity "ℵ". It shows up as an actual aleph character in the preview window. It also shows up as an actual aleph character in the post when I click "Submit," but on reloading the page, it turns into the escaped entity "ℵ". How is it even possible for Discourse* to get that wrong?

    * Spelled correctly so Google, et al., can find this, and expletives redacted so it can show up in safe searches..



  • Whoa.



  • WORKSFORME.

    What browser were you using? Chrome 36.0.1985.125 on Linux, here.



  • I'm typing ℵ just to see it in the preview window because I have no idea what you guys are talking about.



  • דיסקורס



  • @boomzilla said:

    WORKSFORME.

    What browser were you using? Chrome 36.0.1985.125 on Linux, here.

    Also Chrome 36.0.1985.125, on Win 7.


  • mod

    Chrome 36.0.1985.125 m on Windows 7



  • ℵ ℵ

    ℵ ℵ
    

    Interesting, it sees both as valid before posting, but it decides to translate ℵ when you actually reload.



  • Those both showed up as aleph characters when AJAX loaded your post. (I was looking at it when it happened.) I reloaded the page, and the first one turned into the entity.



  • Yeah, I figure whatever streams the post in keeps it as posted (because it streams it to yourself as well), but when it has to load, it goes to the DB, where it was cooked differently. Scratch that, the raw shows it unescaped. Must be a client side thing, like @Onyx says below.


  • :belt_onion:

    Testing for obscurity: Opera 24 on Linux, same result. It's basically Chrome anyway, but for completeness sake...

    Edit: it also fixes itself when you edit, but breaks immediately on posting.



  • Come on, it's just a small bug. It's not like they went to great pains to use the same parser in both user and server sides to avoid this kind of thing or anything.



  • @Onyx said:

    Right before you edited your post, I saw that as an actual aleph.


  • :belt_onion:

    @anonymous234 said:

    Right before you edited your post, I saw that as an actual aleph.

    That's interesing... maybe it IS Ember? Loading it properly on render (or whatever the event is on first load) but failing when calling reopen?



  • I reloaded CTRL+R and now none of them are rendering any more.

    ℵ ℵ

    EDIT:
    When I originally posted this, both looked good. Another refresh, and the first one (aleph) wasn't rendering, only the alefsym one was.



  • Hurray for consistency!


  • :belt_onion:

    Second one looks good to me right now. Reloading and editing...

    Second one still rendering. Damn, how do I check webkit version here, I'm sure that reporting this as "works in Opera 24, in this specific case" will be met with laughter/



  • I edited, and then both looked good, until I refreshed again, then the first went back to badness, where it currently remains for me.


  • :belt_onion:

    Ah... ok, this is what the browser IDENTIFIES itself as at least:

    Browser identification

    Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.35 Safari/537.36 OPR/24.0.1558.21 (Edition Developer)

    Oh, the one that works is ℵ... whatever that is.



  • @boomzilla said:

    I edited, and then both looked good, until I refreshed again, then the first went back to badness, where it currently remains for me.

    Yes, ℵ seems to be consistently good, but ℵ exhibits weirdness.



  • This shows as straight ℵ for me, this smells of character encoding issues.

    "ℵ"

    ℵ
    




  • I don't think it's a browser issue, as I see the same thing in IE, Firefox, and Chrome. It has to be Ember seeing the ℵ, deciding it's not a valid HTML entity and escaping the ampersand, but, as you said, only on reopen.

    In Chrome (actually, all of them), you can see that when you inspect the element as HTML:

    <p>&amp;aleph; ℵ</p>

    Both @boomzilla's and my post are like that, even though both of us used the &alefsym; entity.



  • @Onyx said:

    &alefsym;... whatever that is.

    I, too, was unfamiliar with that entity until about 20m. (That's 20 minutes ago, for those not versant in Discospeak.)

    Edit: Goody, more consistent behavior. Quote an escaped entity string, "&alefsym;", get a character.


  • :belt_onion:

    I'd agree, but @boomzilla says both are broken for him, and &alephsym works for me, at least in his post.



  • No...&alefsym; seems to work consistently, no matter how I mangled that message or confused myself.

    This is definitely a problem with the presentation, not browser.



  • He said only the first went bad.

    I've had &aleph; and &alefsym; in my post, saw the same (only &aleph; is bad after reload), and I'll repeat it here:

    ℵ ℵ
    &aleph; &alefsym;


  • :belt_onion:

    @boomzilla said:

    No...ℵ seems to work consistently, no matter how I mangled that message or confused myself.

    This is definitely a problem with the presentation, not browser.

    @ChaosTheEternal said:

    He said only the first went bad.

    Reading fail. Colour me wrong.



  • @Onyx said:

    whatever that is

    All I could find when I looked really quick was this, which specifies the &alefsym; entity, and this, which mentions "aleph" in the "comments", but no HTML entity.


  • :belt_onion:

    So, ℵ is a hipster version with curves and shit? And that's the only one that works in Discourse.

    Makes sense.



  • Sounds like a case of the browser trying to help you out by using the normal spelling even though it isn't in the standard. But once the server properly cooks the post, it goes away, because it's not a standard entity.

    I think this is probably reasonable behavior and I blame @HardwareGeek for leading us on a wild goose chase.



  • Has anyone tried this with a browser other than Chrome (or a Chrome-alike)? Do other browsers also "[try] to help you out by using the normal spelling"? If that's what's happening.

    I will also note that today is the first time in my life that I have ever seen, or at least noticed, that spelled with an "f" instead of a "ph". Yay Unicode.


  • :belt_onion:

    Firefoxing...

    ℵ ℵ

    Edit: Consistent fail confirmed



  • IE and Firefox both show the correct symbol on the preview and when a post is streamed in. But on reloads, both have the ampersand escaped for &aleph;, but not for &alefsym;.


  • :belt_onion:

    Seems to be reopen indeed (from my understanding of Ember), the streamed post in Opera was broken right away when I posted the previous reply from FF (browsers were on different screens so I had a nice view).



  • &aleph; is mentioned here at least:

    I made a local html file with both, and FF and Chrome correctly displayed them both.



  • @boomzilla said:

    Sounds like a case of the browser trying to help you out by using the normal spelling even though it isn't in the standard. But once the server properly cooks the post, it goes away, because it's not a standard entity.

    At least in XML (and therefore XHTML), &aleph; is a valid entity:
    @http://www.w3.org/TR/xml-entity-names/byalpha.html said:

    aleph, , isotech , /aleph aleph, Hebrew , U+2135 , ALEF SYMBOL,

    It seems to be a thing in SGML, too:
    [quote="http://www.w3.org/2003/entities/iso9573-2003doc/9573.pdf]
    Information technology - SGML support facilities

    • Techniques for using SGML
      Part 13: Public entity sets for mathematics and
      sciences
      ...
      aleph 02135 /aleph aleph, Hebrew ALEF SYMBOL
      [/quote]


  • @HardwareGeek said:

    &aleph

    ℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵ

    Welp, i wanted to see if discourse counted the single encoded entity towards the character limit or the encoded entity text.



  • Fun fact: A long string of ℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵ is pronounced "                                                             "



  • @delfinom said:

    Welp, i wanted to see if discourse counted the single encoded entity towards the character limit or the encoded entity text.

    You should use the one that discourse recognizes.



  • Somebody filed this one for me!

    http://www.discoursebugs.com/discoursebugs/issue/3/aleph-shows-in-preview-but-not-in-post

    Also? Search muthafuckin works on my tracker.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.