HTML not being sanitized

Technical Support

Suggested Topics


  • How to tweak blockquote html?

    Solved Technical Support
    0 Votes
    9 Posts
    178 Views

    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...?

    Solution

    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?

    PrettyDeepQuotes.JPG

  • 0 Votes
    6 Posts
    628 Views

    @pitaj it worked.

  • HTML sanitize (dont working)

    Solved Technical Support
    0 Votes
    6 Posts
    719 Views

    @frgilb Thank you so much.. i am so stupid) dont seen it.
    Already workin)

  • MySQL data to html

    Technical Support
    0 Votes
    3 Posts
    687 Views

    @evgeniy-onegin it's not simple. If you don't know where to start, and especially if you aren't a programmer, you're going to have a hard time.

  • 0 Votes
    3 Posts
    1k Views

    This is all dependent on how each server is configured.