OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



<fb:like> tag is stripped

Are you responsible for making OMP work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, asmecher

Forum rules
What to do if you have a technical problem with OMP:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OMP Discussion subforum; if you have a development question, try the OMP Development subforum.

<fb:like> tag is stripped

Postby SebastianNordhoff » Wed May 07, 2014 6:39 am

I want to add a <fb:like> tag to the footer of my OMP 1.1. installation. I do this by going to management/settings/website, and clicking the HTML button in the "Press Page Footer" area. I then paste the HTML I want (If there is an easier way to get my HTML in there, I would be happy as well). Upon saving, the <fb:like> tags disappear.

I have edited my config.inc.php to include
allowed_html = "fb:like,a[href|target],em,strong,cite,code,ul,ol,li,dl,dt,dd,b,i,u,img[src|alt],sup,sub,br,p,h1,h2,h3,div[class],span[class]"

However, my php5error.log tells me: "Message: USER WARNING: Element 'fb:like' is not supported (for information on implementing this, see the support forums) "

I had a look at
viewtopic.php?f=40&t=11458&p=44101&hilit=tag#p44052
but the solutions proposed there do note seem to apply to OMP 1.1., as the files mentioned do not exist on my system.

I will be the only person editing HTML on that particular installation. Is there another way of storing the HTML I want in OMP as a workaround?
SebastianNordhoff
 
Posts: 1
Joined: Wed Apr 02, 2014 12:48 am

Re: <fb:like> tag is stripped

Postby asmecher » Wed May 07, 2014 7:22 am

Hi Sebastian,

That message is coming from the HTML Purifier, as "fb:like" is not a valid tag in the HTML version we use. However, you can tweak HTML Purifier, including adding elements, according to this document. HTML Purifier is integrated in lib/pkp/classes/core/String.inc.php in the stripUnsafeHtml function.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8676
Joined: Wed Aug 10, 2005 12:56 pm


Return to OMP Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests