Spaces in "Allowable HTML Tags Attributes" Does Not Work

Discussion in 'Installation and setup (Kayako Download)' started by Marvin Herbold, Feb 10, 2012.

  1. Marvin Herbold

    Marvin Herbold Established Member

    Just a heads up to the Kayako community - if you have spaces in your "Allowable HTML Tags Attributes" it will not work. The function strip_tags_attributes at __swift/includes/functions.php line 295 is not designed to handle spaces in this parameter.

    So in other words: "href, style, width" will not work but "href,style,width" will.
     
  2. Marvin Herbold

    Marvin Herbold Established Member

    I found another issue with Allowable HTML Tag Attributes...

    I do not allow the "class" attribute. Yet the "class" attribute was getting through in some instances. I debugged the code and found that it filters out attributes ONLY if it is followed by a ="..." or ='...' meaning:

    <p class="foo"> and <p class='foo'>

    gets filtererd out... while:

    <p class=foo>

    does not get filtered out!

    :(

    The issue is in the same function (strip_tags_attributes). It seems to be poorly written and someone from Kayako needs to revisit it. According to HTML specs, the use of quotes around attribute values is optional.
     
  3. ad_amin

    ad_amin Established Member

    Hi,
    I have a problem with html tags in the ticket posts... they are not rendered. I have the HTML Conversion set to Strip Tags and allowable tags are not rendered until I put a br tag into the content of the post - when I remove it all the other tags are again rendered as a plain text.
    I've just spoken to the Kayako Support and they said that allowable tags setting works only for the tickets created through the email queue - is that correct? Have anyone of you guys managed to allow html tags in the tickets created via the support centre? If yes then please let me know how to do this (I'm currently hacking all the posts by injecting a br tag to their content - looking for a better way :) )
     

Share This Page