SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: ★ in IE 9-

  1. #1
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    1,881
    Mentioned
    32 Post(s)
    Tagged
    0 Thread(s)

    ★ in IE 9-

    So, Any work around to the fact that IE doesn't get the newer HTML special character glyph ★ ?

    I'm thinking of using some form of Java Script fix will be needed, but if there's something I can do without resorting to JS I'm all ears.

    (Note, IE 10 is fine, so any fix must not affect IE 10 or later)

  2. #2
    SitePoint Guru bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Numeric entities always work.



    Off Topic:

    SP's entity escaping seems a bit buggy.
    "Folks who know what they're doing make complexity seem simple."

  3. #3
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,238
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    The Black star ★ U+2605 ★ for vBulletin use HEX 'numerical character reference' in vBulletin and it will display.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  4. #4
    Mouse catcher silver trophy
    SitePoint Award Recipient Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,083
    Mentioned
    65 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    The Black star ★ U+2605 ★ Jeff for bulletin use 'numerical character reference' for the ampersand & in vBulletin and it will display.
    Uh, that's a bit of my fault, I tried to correct Jeff's slightly broken code and managed to completely ruin it, was hoping I could invisibly mend it before anyone noticed but apparently not :-(

    The problem with using &#38; to code an & is that as soon as you go to edit or quote it, it reverts back to being a plain & so you lose whatever you were trying to do, as it has done here. The easiest way to spell out an entity is to break it up with code, something like &[b][/b]nbsp;.
    Any posts I write in Arial are on my mobile phone, so please excuse typos etc.
    Any posts I write in Verdana are on a PC, so feel free to berate me mercilessly for any mistakes


  5. #5
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,238
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    There is another way of doing it apart from Hex, though at the moment I have forgotten... I did having it working then it reverted.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  6. #6
    SitePoint Guru bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    for vBulletin use HEX 'numerical character reference' in vBulletin and it will display.
    I'm glad there's a workaround. Is there any interest in fixing vBulletin to behave consistently in the first place?

    The way it seems to work right now is:

    If I type & # 9733 ; then the ampersand is not escaped, and the entity renders. -> ★

    OK, I think, if ampersands aren't escaped, then perhaps I can type & amp ; #9733 ; But no, because in this case, it seems, the ampersand is escaped. -> &amp;#9733;

    The ideal would be if ampersands were always escaped. After all, they're a special HTML character, just like < and >. But if for some reason that's not possible, then it would be super nice if it were at least consistent. Either they're always escaped or always not.
    "Folks who know what they're doing make complexity seem simple."

  7. #7
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,238
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    NCRs (numeric character references) and 'character entity references' are types of character escape used in markup. Getting back to the question NCR is the preferable choice over the entities, entities are limited to a subset of Unicode characters, NCR can specify any character and theoretically Hexadecimal has less ambiguity.

    <ot>Going back into the SPF archives over the forum weirdness; post #6 onwards: Ampersand Confusion: "cannot generate system identifier for general entity"</ot>

    Off Topic:

    Yes, editing the post #3 made things go wonky for me. Hence why my post differs in Stevie's QUOTE because I was still fiddling to tame the damn beast, as editing resulted in it parsing the characters differently each time.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  8. #8
    SitePoint Guru bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    NCRs (numeric character references) and 'character entity references'...
    Oops. I had the wrong terminology. I mistakenly called it a numeric entity.

    NCRs (numeric character references) and 'character entity references' are types of character escape used in markup. Getting back to the question NCR is the preferable choice over the entities, entities are limited to a subset of Unicode characters, NCR can specify any character and theoretically Hexadecimal has less ambiguity.
    Fantastic post!
    "Folks who know what they're doing make complexity seem simple."

  9. #9
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,238
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    There is what are called: Character Entity References and Numeric Character References nearly everyone gets it wrong. EXTREME AWXSOME danger levels.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  10. #10
    Mouse catcher silver trophy
    SitePoint Award Recipient Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,083
    Mentioned
    65 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    NCRs (numeric character references) and 'character entity references' are types of character escape used in markup. Getting back to the question NCR is the preferable choice over the entities, entities are limited to a subset of Unicode characters, NCR can specify any character and theoretically Hexadecimal has less ambiguity.
    On the other hand, I can remember lots of entity names, but trying to store all those NCRs in my head isn't going to work, so from that point of view it is much easier, for those characters, to use named entities rather than have to look up the NCR every time!
    Any posts I write in Arial are on my mobile phone, so please excuse typos etc.
    Any posts I write in Verdana are on a PC, so feel free to berate me mercilessly for any mistakes


  11. #11
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,238
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    Now, if you wanted to avoid having to enter certain entities you may want to save as UTF-8 so you could input the special character directly.

    NCR as explained are more functional. HTML 4.01 has 252 Character entity references: http://www.w3.org/TR/html401/sgml/entities.html For X(HT)ML an application of XML, we have the XML specification that defines five "predefined entities" only: http://www.w3.org/TR/REC-xml/#sec-predefined-ent hence NCR should only be used if authoring XHTML and not using one of those 5 and HTML 4.01 only has 4 of those.

    Numeric character references, both decimal and hexadecimal, can be safely used in (X)HTML and XML, but you need to be careful that you're referencing the character's code point from the Unicode character repertoire, not Windows-1252.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  12. #12
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    1,881
    Mentioned
    32 Post(s)
    Tagged
    0 Thread(s)
    Thanks everyone.

    While I was away I changed my mind on how I wanted to do this effect and chose a set of buttons in a JS interface.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •