HTML not being sanitized

Technical Support

Suggested Topics

  • How to tweak blockquote html?

    Solved Technical Support
    0 Votes
    9 Posts

    Well I have a solution. I haven't written code in years and Javascript in a decade so there may be bugs! 😆

    A preliminary question: action:composer.loaded offers the containing element, which allows one to find the text area directly. I wasn't able to do such a thing with action:composer.addQuote. I am wondering if there is a way to access the element directly, such as by importing <a module> into the custom Javascript...?


    Basically I am using Javascript to pretty up the quote structure when a post is being written. I simply dump it in the "Custom Javascript" part of the admin. Within the composer, it moves the quote attribution into the quote itself and adds a newline if there are no nested quotes. The code uses a delay to edit the text in the composer 150 ms after action:composer.addQuote fires. The delay is necessary because it is possible to add quotes to an already-existing composer, and there is no addQuote parallel to action:composer.loaded.

    Editing the text within the composer allows previews to match what is seen on the site, but unfortunately this means that past posts will not be affected. There is also a function that removes nested quotes > 4-deep, which is only called on action:composer.loaded.

    If anyone wants the Javascript file they are welcome to it. I guess we can't upload files here?


  • 2 Votes
    5 Posts

    Sorry for the delay. The hovering pagination block may not work as expected, but I think the pagination at the bottom of the page should work fine:


  • 0 Votes
    5 Posts

    @pitaj Great! That's good to know!

  • 1 Votes
    12 Posts

    @julian Thank you. I will try that out. ☺

  • 0 Votes
    16 Posts

    Yes, it works fine in v1.0.2 🙂