Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

htmLawed and cleaning of HTML code corrupts Canned responses and replies to emails

I'm very gratefull for osTicket, it makes our life a lot easier. Or at least it did until v1.10

Firstly the info of our osTicket installation:
Server Information
osTicket Versionv1.10 (901e5ea) —  Up to date
Web Server SoftwareApache
MySQL Version5.5.54
PHP Version5.5.38
So for the trouble I mentioned in topic. I'll explain on a case.

Our templates were working fine before the upgrade, links like %{recipient.ticket_link} were all working normally. After the upgrade our firm changed the logo in email signatures so I went to fix the logos in our templates as well. After the edit of the template the previously set links changed from a href="%{recipient.ticket_link}" to a href="%%7Brecipient.ticket_link%7D".
As well as this upper case, all our Canned responses are cleaned out of any styles that previously worked. We had some styled tables inside with some variables, that were working just fine in 1.9.*.

So I have been exploring some options and got to the htmLawed and some other functions that are cleaning out and substituting all the code.

How can I stop it from cleaning it out and maybe even disable it?

Thank you for all your suggestions and help.

Regards, Jure


  • edited February 2017
    I'm attaching the screenshot of the email without style cleaned up before the upgrade and than what happened to the same code after the upgrade.

    It is the same HTML code for both instances. Believe it or not :)
  • Bump. Anyone?

    I've recently noticed it strips out images as denied to.

    Please help, this issue is rendering osTicket useless.
  • This is not related, but I'd update to PHP 5.6.x - I have seen folks having issues with anything less installed for OST v1.10. Maybe that will fix your issue, but I really cannot say because this is not my area of expertise.
  • You would have to edit the source.  I think that here's where and what:


    - On line 172 comment out entire function html()
    - On line 204 change *$html = Format::html(Format::htmldecode($html), array('balance' => 1));* to *$html = Format::htmldecode($html);*
    - On line 327 change *return Format::html($html, $config);* to *return $html;*
  • side note...  you would also have to find a way to rework include/class.thread.php line 2211.
Sign In or Register to comment.