OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Allowed HTML in OMP 1.1

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.

Allowed HTML in OMP 1.1

Postby vlilloh » Thu Mar 06, 2014 4:20 am

Hi,

After update to OMP 1.1, "href" attribute doesn't work: http://libros.um.es/editum/catalog/book/1101

I think my allowed_html (OMP 1.1 default) is right:
allowed_html = "a[href,target],em,strong,cite,code,ul,ol,li,dl,dt,dd,b,i,u,img[src,alt],sup,sub,br,p"

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

Re: Allowed HTML in OMP 1.1

Postby asmecher » Thu Mar 06, 2014 10:13 am

Hi Vicente,

I've just checked using a link and it seems to be working here; can you double-check the HTML you're specifying to see whether it contains other attributes than "href" and "target", and whether there's anything particular like Microsoft custom directives appearing in the HTML? (Use the "HTML" button to inspect the tags TinyMCE is working with.) If you like, PM me the raw HTML you're working with so that I can test it locally.

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

Re: Allowed HTML in OMP 1.1

Postby vlilloh » Fri Mar 07, 2014 1:34 am

Hi Alec,

I think that the HTML in the backend is right and the tags in TinyMCE is working with. There is no strange code. Only HTML:

captura.png
captura.png (378.99 KiB) Viewed 4937 times

The raw HTML:

Code: Select all
<p><strong><a href="https://publicaciones.um.es/publica/ControlPublicaciones?opcion=publicacion&amp;referencia=L3900001&amp;origen=PUB_SIU&amp;desde=B%26uacute%3Bsqueda%20en%20el%20cat%26aacute%3Blogo&amp;opcion_menu=3">Comprar edición impresa</a></strong></p><p><strong>Presentación: <a href="http://tv.um.es/videos?serie=12541">Vídeo 1</a> | <a href="http://www.youtube.com/watch?v=BMbtbLoxCLs">Vídeo 2</a></strong></p><p>Este libro recorre la trayectoria universitaria de Mariano Ruiz-Funes, desde su cátedra de derecho penal en Murcia hasta su actividad de articulista, conferenciante y docente en la UNAM.</p><p>Se presenta la lucha intelectual desde el exilio contra la depuración del profesorado en la postguerra y contra la instrumentalización franquista de la universidad. Gracias a la documentación donada al archivo universitario de Murcia, podemos conocer su intensa actividad desde la Unión de Profesores Universitarios Españoles en el Extranjero ante la opinión pública internacional. En los primeros años, cuando se veía casi segura la caída del régimen de Franco junto al resto de fascismos europeos, se elaboran propuestas de reorganización de la universidad y reintegro a las cátedras. Pero al avanzar la segunda mitad de la década, cuando las democracias abandonan “el problema español”, los textos serán ya sólo para dejar constancia de la degradación y reflexionar sobre lo que habrá de ser la universidad en una España libre y plural.</p><p>A través de los textos de Ruiz-Funes nos encontramos con un pensamiento republicano sobre la enseñanza universitaria y la investigación científica, que supone un reverso a la legislación universitaria de la dictadura. Además profundizamos en las redes de apoyo entre profesores, políticos e intelectuales en México y otros países latinoamericanos, a través de instituciones como la Academia mexicana de ciencias penales o El Colegio de México, que permiten comprender mejor las carreras científicas de los profesores en el exilio. El libro combina una visión interna de la Universidad de Murcia hasta la guerra, con una externa en los años cuarenta, escrita en la distancia, como “tarea de la inteligencia”, desde prensa, revistas y manifiestos, contrapeso a la España oficial.</p>

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

Re: Allowed HTML in OMP 1.1

Postby asmecher » Fri Mar 07, 2014 10:42 am

Hi Vicente,

Hmm, I've just tried that locally (also on OMP 1.1.0 from the tarball) and it's working. What I'm seeing on your site is consistent with the "href" attribute not being allowed in the "a" element -- the href is stripped but the anchor tag remains.

The only place I can think of this happening is the allowed_html configuration directive; are you sure that's set as quoted above? (The format of this configuration directive changed between OMP 1.0 and 1.1, so if you brought your old configuration across, that will cause problems.)

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

Re: Allowed HTML in OMP 1.1

Postby vlilloh » Fri Mar 07, 2014 12:43 pm

Hi Alec,

Yes. The allowed_html configuration directive is set as I quoted at the beginning:

allowed_html = "a[href,target],em,strong,cite,code,ul,ol,li,dl,dt,dd,b,i,u,img[src,alt],sup,sub,br,p"

I'm using the config.inc.php file of OMP 1.1. I realized in the updating that the format of this configuration directive changed.

I don't know what may be happening :(

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

Re: Allowed HTML in OMP 1.1

Postby vlilloh » Fri Mar 07, 2014 12:46 pm

Hi Alec,

If I remove ",target", then it works!

allowed_html = "a[href],em,strong,cite,code,ul,ol,li,dl,dt,dd,b,i,u,img[src,alt],sup,sub,br,p"

Is that normal?

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

Re: Allowed HTML in OMP 1.1

Postby asmecher » Fri Mar 07, 2014 1:13 pm

Hi Vicente,

Ah! The sample configuration got the syntax wrong. It should be per this directive, i.e. using "|" instead of "," to separate attributes. For some reason commas work on my system, which must be a platform difference of some kind.

I've filed this at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8596.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8905
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