WordPress.org

Ready to get started?Download WordPress

Forums

Escaping HTML processing? (7 posts)

  1. lbenson99
    Member
    Posted 8 years ago #

    Hey guys,

    I've got a really annoying problem that *should* be easy to fix, but it's proving mighty difficult to find a simple resolution.

    Basically, I want a way to *avoid* escaping characters in my WP posts to the equivalent HTML entity code, for certain snippets of the post.

    For instance, when I include the link...

    http://example.com/script.php?a=1&b=2

    ... the "&" parts are output as "& # 3 8 ;" (without the spaces) - which makes for great HTML, but breaks my code.

    It's fine for standard HTML but when I start including dynamic Javascript/Flash objects, it's a real pain.

    Isn't there a simple tag I can wrap around certain snippets of code to tell WP to output *as is*?

    Would appreciate your input... thanks!

    All the best, -Lee

  2. vkaryl
    Member
    Posted 8 years ago #

    Can't you just use & there, or does THAT break something too?

  3. lbenson99
    Member
    Posted 8 years ago #

    That works in certain situations.

    But my point is... when I want to use absolute literal code in my posts that will output in the same way I type it... how do I make WP do that?

    Any plug-ins of any kind?

    Thanks.

  4. vkaryl
    Member
    Posted 8 years ago #

    That I don't know. One of the "real coders" around here might.... In other words, you're meaning the way we use backticks here so that the code isn't parsed, right?

  5. lbenson99
    Member
    Posted 8 years ago #

    I guess so, I've never used backticks here.

    I tried surrounding a snippet I didn't want parsing with backticks inside a WP post, but all that did was display the backticks on the page... so I'm assuming the same doesn't apply to regular posts?

    Thanks for your help.

  6. vkaryl
    Member
    Posted 8 years ago #

    Nope, that's just one of the specifics for here (bbpress wp forum-specific), it just means code displays here when you post it, instead of it either partially disappearing or doing something else dumb.

    When I was actively writing MUSH softcode, there were things one did to effect what you're looking for, but there again, they were specific to the server environment for those game servers.

    So I don't really know the answer to your specific question, but I'll bet there is one! Just keep checking back, bound to be someone around eventually who's more help than I am....

  7. blakekr
    Member
    Posted 8 years ago #

    I have the same problem of not being able to include javascript within the page because of how WP converts the ampersands (etc.) and breaks it. Did anyone ever find an answer? I thought using the Text Control plugin and turning off all formatting would solve the problem, but it hasn't.

Topic Closed

This topic has been closed to new replies.

About this Topic