Writing Character Entities and Code in Posts

  • Author
    Posts
  • #50363

    lorelle
    Member

    Until recently, I haven’t had a problem putting HTML character entities and codes into my WordPress.com blog. To make the “less than” arrow, I would use <. For the typical symbols and characters, these work great.

    However, I’m working on an article and I need to feature some character codes. For example, to create a semi-colon with an HTML character entity, you would use & #59;.

    To write this on my WordPress.com post, I would write &#59;. However, it gets filtered out on Save and Continue Editing to & #59; which the browser then converts to ; . So my example for creating a character entity for the semi-colon becomes “; – ;”. Not helpful.

    How do I write examples of less common character entities without doing hokey things like putting a space between the ampersand and the rest of the code?

    Thanks.

    #50561

    engtech
    Member

    Don’t try and use a TEXTAREA — that will screw up the editor and cause lockups when trying to edit posts.

    I always have trouble with this as well, so I don’t know what to tell you :(

    #50582

    lorelle
    Member

    That method never occurred to me. I’ve done this on full version WordPress blogs and haven’t had a problem, so I’m wondering what it is that allows me to make the < and not the &34; character code in WordPress.com. Very frustrating.

    #50616

    drmike
    Member

    If Lorelle can’t figure it out…. :)

    I know we have an issue with text being reconverted when using the ‘Save and continue editing’ save that you mention. Like it’s being passed through the conversion routeins again and again. Only thing I can suggest is not doing that and writing your post ahead of time in another editor.

    Pain in the butt if you ask me.

    #50628

    engtech
    Member

    Useful utility for converting mark-up to safe-to-display HTML:
    http://www.destraynor.com/c2h.html

    I don’t think it fixes this problem, though.

    #50630

    drmike
    Member

    Ooh, didn’t know about that one. The one that I use misses a lot of them.

    Thanks,
    -drmike

    #50694

    devblog
    Member

    lorelle, you want something like this?

    #50773

    lorelle
    Member

    devblog: EXACTLY.

    How did you get those to appear as code?

    Hand over the secret NOW! ;-)

    #50774

    raincoaster
    Member

    Say Please!

    #50785

    devblog
    Member

    Well, you just need to write the ASCII for the number sign too.

    Check my example to see the code. I tried to put it here but it didn’t work…

    Hope this helps.

    PS. After you see this, can you please lemme know so I can delete the test page? Thanks.

    #50832

    drmike
    Member

    Well, you just need to write the ASCII for the number sign too.

    I thought that that was what Lorelle was doing up above?

    #50836

    devblog
    Member

    Nope, she was only writing the ampersand HTML code.

    #50839

    lorelle
    Member

    Genius! Thanks. I forgot that all the codes had to be converted. I hadn’t taken it that far this time. You are a star.

    Oh, and you can delete the test page. :D

    #50864

    devblog
    Member

    Glad to be of assistance

    #50938

    drmike
    Member

    Just remembered that you can try using the method of encoding to hid your email address as well if you want to try it. :)

    #50967

    very nice, devblog. i wish i’d seen this 2 days ago

The topic ‘Writing Character Entities and Code in Posts’ is closed to new replies.