• Hi,

    Why when I enter the code in the text box after the change in the visual some parts of code are Change by WP?

    For example,

    <img onmouseover="this.src='https://tristram.net.pl/wp-content/uploads/2014/01/poradnik-do-diablo-iii-on.jpg';" onmouseout="this.src='https://tristram.net.pl/wp-content/uploads/2014/01/poradnik-do-diablo-iii-off.jpg';" src="https://tristram.net.pl/wp-content/uploads/2014/01/poradnik-do-diablo-iii-off.jpg" alt="/diablo 3/" height="79" width="241"></a>

    WP turns on:

    <img src="https://tristram.net.pl/wp-content/uploads/2014/01/poradnik-do-diablo-iii-off.jpg" alt="/diablo 3/" width="241" height="79" />

    wtf ? :< Where I can disable this options to correct the html code?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    The visual editor will wreck HTML code when inserted by hand that way even if you use the Text box. You can try to disable the visual editor in your profile but that may not be an attractive solution.

    Is it all links that you want to do that or only some?

    Thread Starter TTBoS

    (@ttbos)

    On the website I have a lot of such links with pictures where I use onmouseover and onmouseout

    For example https://tristram.net.pl/dziennik-diablo-iii/

    https://tristram.net.pl/podstawy/ etc.

    So do all of this manually will now terribly heavy.

    But actually disable the visual mode profile gives something because the article code already will not change.

    But I hope that something of this will be done in a short time, or any option to disable html improve because we are in 2014 and I now go back to 2000 or worse ;p.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    So it’s only the images that are loading from https://tristram.net.pl/wp-content/uploads/ that you want that done?

    The reason I am asking is that onmouseover and onmouseout can be added via a small plugin using a filter. That way you don’t have to edit that HTML manually and it would be applied on all of the image links in your post that way.

    If that’s the case then I can tonight modify a small plugin such as this one https://pastebin.com/7dXbUNGw and use the img src for your site instead.

    WordPress filters are one of my favorite features. ??

    Thread Starter TTBoS

    (@ttbos)

    Yes all the pictures are from the path https://tristram.net.pl/wp-content/uploads/ but just do not know if this has any meaning, because they are still divided into years and months, for example, https://tristram.net.pl/wp-content/uploads/2014/01/ or https://tristram.net.pl/wp-content/uploads/2013/08/ etc.

    Of course, if only it will help ?? and thank you very much for your help :).

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Not a problem as I’ve said filters are my favorite feature. Everyone should play with small plugins like that, it’s a great way to learn. ??

    I’ll post the code here and an explanation of how and why it works (or doesn’t work) tonight.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Hrm. It’s actually more complicated then I first believed and I’ll have to give this some more thought.

    I had misunderstood the <img src="... part and I think a short code may work out better. But that’s a different problem and I’ll give that solution more thought.

    It’s a challenge alright. ??

    Thread Starter TTBoS

    (@ttbos)

    hmm not be possible to convert the TinyMCE 4.0 to not remove the onmouseover and onmouseout code? or where can I report this bug?

    Because now I know for the 99% that the fault lies with TinyMCE 4.0.

    And I think that making a script can be very difficult to do and extremely time consuming.

    Thread Starter TTBoS

    (@ttbos)

    I received a reply regarding the onmouseover and onmouseout that is already in WP no it never will work fine, at least when it comes to official updates.

    These attributes are insecure and thus will always be stripped out (in any
    version of WordPress) unless you have the ability to post unfiltered HTML.
    This capability is usually reserved for users of the Editor and
    Administrator role.

    ;/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Automatic re code html’ is closed to new replies.