Unwanted HTML Tags in Contact Page

Hello,

I’m trying to find the reason for having HTML tags on my conference’s /about/contact page.
Currently, I have the following there:

Principal Contact

Name of the Principal Contact <!DOCTYPE html> <html> <head> </head> <body> <p>Some text </p> <p>Some other text</p> </body> </html> Email: example@ example

Support Contact

Support Contact Name and email

Obviously, there are some undesired HTML tags in the text field under Principal Contact. I noticed that this problematic field is filled though the TinyMCE plugin. While the details entered for ‘Support Contact’ (on the same page) do display properly. I think that’s because the text boxes for these fields don’t use TinyMCE in this case.

I already had a similar issue with some HTML tags being displayed in my emails in OCS. The solution that worked was to change some part of the code from text/plain to text/html in Mail.inc.php.

Unfortunately, this time I’m unable to achieve the same result, as I’m not sure where/what to check/change exactly.

Can someone advise me on what to do in order to remove these HTML tags from the about/contact page?

Thank you.

Regards,
DD

Hi @Dragomir,

Look e.g. in templates/about/contact.tpl. Wherever you see a template variable being passed through the escape Smarty modifier, it means any HTML contents will be displayed literally as you see. You might change this to strip_unsafe_html instead of escape to allow limited HTML.

The other issue is that you’re trying to include a full html element set in an already-existing document, but I think that’s probably related to the local modification that makes the contact information field appear in a TinyMCE control.

Regards,
Alec Smecher
Public Knowlege Project Team

1 Like

Hi Alec,

Your suggestion worked perfectly. Thank you so much!

Regards,
Dragomir