OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



iframe

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.

iframe

Postby vlilloh » Thu Oct 17, 2013 5:13 am

Hi,

I added <iframe> as allowed_html in config.inc.php. I want to add previews from Google Books to my monographs synopsis. For example,

Code: Select all
<iframe frameborder="0" scrolling="no" style="border:0px" src="http://books.google.es/books?id=z_5CktXkDgwC&lpg=PA86&dq=cuestionario%20para%20la%20evaluacion&hl=es&pg=PA86&output=embed" width=500 height=500></iframe>

In TinyMCE editor looks fine, but later in the book synopsis page this code does not appear. Any idea?

Thanks.
vlilloh
 
Posts: 285
Joined: Thu Feb 07, 2008 3:35 am
Location: Murcia, Spain

Re: iframe

Postby asmecher » Thu Oct 17, 2013 9:00 am

Hi Vicente,

You'll also need to specify the allowed attributes, e.g.
Code: Select all
allowed_html="<iframe frameborder|scrolling|style|src|width|height>..."
Check to see what parts, if any, of the tag are displayed on the page where this is being truncated; you won't need to re-save the HTML before you try this, as the HTML truncation is being done on display, not on input.

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

Re: iframe

Postby vlilloh » Thu Oct 17, 2013 11:56 pm

Thanks James.

I've just specified the allowed attributes, but entire <iframe>...</iframe> element continues being truncated on display.

Cheers.
vlilloh
 
Posts: 285
Joined: Thu Feb 07, 2008 3:35 am
Location: Murcia, Spain

Re: iframe

Postby asmecher » Fri Oct 18, 2013 8:24 am

Hi Vicente,

If you view the source of the page that's showing the truncated tag, what does it include? Anything of the iframe?

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

Re: iframe

Postby vlilloh » Fri Oct 18, 2013 8:39 am

Hi Alec,

Yes. Anything of the iframe :(

Thanks.
vlilloh
 
Posts: 285
Joined: Thu Feb 07, 2008 3:35 am
Location: Murcia, Spain

Re: iframe

Postby asmecher » Fri Oct 18, 2013 10:02 am

Hi Vicente,

Found it: the HTML purifier library we use to ensure that user-supplied HTML is safe requires specific configuration -- as it should -- to allow iframes. See http://stackoverflow.com/questions/4739284/htmlpurifier-iframe-vimeo-and-youtube-video for some instructions. The library is initialized in lib/pkp/classes/core/String.inc.php in the stripUnsafeHtml function; you can modify the library's configuration there.

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


Return to OMP Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest