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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

<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: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OMP Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests