HTML sanitize (dont working)

Solved Technical Support
  • Hello. i need help for this plugin (HTML sanitize)

    I need half of codes from https://bootswatch.com/3/cosmo/

    Example --

    • Emphasis classes (typography)
    • Tables (to support <table class=""> ) and tr / td too
    • Labels
    • Buttons
    • Navs (Tabs need)
    • Progress bars

    Who can help me?

    My settings is -

    Allowed tags - [ "h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "p", "a", "ul", "ol", "nl", "li", "b", "img", "i", "strong", "em", "strike", "code", "hr", "br", "div", "table", "thead", "caption", "tbody", "tr", "th", "td", "pre", "summary", "details", "iframe", "button" ]

    AllowedAttributes - {"a": [ "href", "name", "target" ], "img": ["data-*", "src", "class", "alt", "title"], "iframe": ["src"], "div": ["class"], "button": ["type", "class" ] "table": ["class"], "tr": ["class", "bgcolor"], "td": ["class", "bgcolor" }

    Self closing tag is - [ "img", "br", "hr", "area", "base","basefont", "input", "link", "meta" ]

    What i supposed to do?

    I made this workin (Alerts)

    <div class="alert alert-dismissible alert-warning">
    <button type="button" class="close" data-dismiss="alert">×</button>
    <h4>Warning!</h4>
    <p>Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, <a href="#" class="alert-link">vel scelerisque nisl consectetur et</a>.</p>
    </div>

    And made panels workin too.

    But i cant make other things to work too.. without sanitize workin all.. but i need to block "bad tags"
    Who can help me with this?

    Which tags / attributes i need to enter to see working html tags from https://bootswatch.com/3/cosmo/ that i listed?

    EDITED -
    Alerts and panels WORKED when i dont added "table": ["class"], "tr": ["class", "bgcolor"], "td": ["class", "bgcolor" }

  • See how with sanitize
    1_1532523813431_guid2.png

    and without..
    0_1532523813430_guid1.png

    What i need to do?

    @psychobunny , @julian , @Global-Moderators .

    I need this so much)

  • Do not ping people or groups or of the blue like that. Especially within hours of your original post, that's unacceptable.

  • @PitaJ sorry. i dont know that it is bad.

    I dont sleep 2 day)) must find a way how to fix it..

  • If you have copied the rules 1:1, I might have an Idea: there ist a "," missing!

    Here: ..."button": ["type", "class" ], "table": ["class"], ...

    Give a try!

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


Suggested Topics