WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to block the editor to convert my characters? Why no one answers? (4 posts)

  1. adrianTNT
    Member
    Posted 7 years ago #

    Hello, I asked this again today but no one wanted to reply. Let me know if you know anything about the issue so I decide if I delete WordPress or not.

    I am trying to insert javascript into a post (NO, I do not want to display code on site). I need this for functionality not for showing code to users.

    The editor converts all my quotes " to html entities like & #8221; then my code doesn't work.

    How can I stop this? I used some plugin that set the encoding of script to "no encoding" but then all my formating was lost.

    Any [other] ways to block the editor from converting my code?

    WordPress seems to need 3 fixes and 5 plugins for every line you type in a post :(

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    a) Don't use the rich text editor. Then it won't change things quite so much.
    b) Use this plugin I wrote to make WordPress not mess with javascript in posts: http://ottodestruct.com/wpstuff/scriptenabler.zip

    And WordPress doesn't need any fixes for typing stuff in posts unless you want to type something strange. Like javascript, for example. It's a very unusual thing to want to to put in a post directly. Usually you would want it in the theme instead.

    Posts should contain text and minimal html only. That's sort of the whole point of keeping them separated from the rest of the blog. Every time you stray from that, you make your life harder and erode the separation of the blog and the content of the blog a little further. If you change your theme, will your posts suddenly not work anymore? Something to consider, you know?

  3. adrianTNT
    Member
    Posted 7 years ago #

    Thank you Otto, yes, that you say makes sense, blogs are usually for posting text and minimal html and what I usually use is flash, video, flv, etc, that makes things complicated so I need plugins and staff. I will look at your link now.
    Thanks.

    - Adrian.

  4. adrianTNT
    Member
    Posted 7 years ago #

    I just installed that script, it worked perfect and simple.
    I spent more than a day trying to insert a javascript by different ways.
    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic