Inconsistent HTML display in article titles

Hi!

I am newbie to pkp (OJS 3.2.1.1). I am moving a science journal to ojs and have run into this problem.

The html markup shows an inconsistent display in article titles. Italics, superindex or subindex are correctly shown in article titles in the issue TOC, but the html markup appears in the title in the individual article page, and the same appears in the citation box.

For the transfer I have created an xml exporter in my old site that works perfect. The journal has many titles with HTML formats. The exporter protects problem characters appropriately and moves them smoothly to OJS using the imported. Everything is fine, but in the titles the problem reported here appears.

For my work, the entry of the html markup is not a problem, since the importer enters them correctly through xml.

The problem is the output, and there is something clearly inconsistent here. In the table of contents the formatting is interpreted correctly, therefore it is perfectly possible. However, in the independent articles, in the title and in the citation, the html markup appears.

I think the code could at least be revised to make it consistent across TOC and individual items.

In sciences, formats like italics, superindex and subindex are relevant.

The introduction of the formatings in the title is another subject, but fixing the output would at least solve (more than) half the problem, I think.

Cheers!

Hello @adguah,

A few questions:

  1. What version of OJS are you importing into
  2. Can you provide an example (screenshot or link to an article), demonstrating how the titles with the HTML markup are displaying?

-Roger
Public Knowledge Project Staff

Hi @rcgillis,

Sure! We are using OJS 3.2.1.1.

The site is not yet public, so probably you cannot see it.

This is the issue url:
https://erevistas.publicaciones.uah.es/ojs/index.php/dianas/issue/view/15

And the article url is:
https://erevistas.publicaciones.uah.es/ojs/index.php/dianas/article/view/102

Here are some screen captures:

In the issue TOC the html formats are correctly applied.

Pay attention to the words Candida and in vitro, correctly displayed in italics in the title of the first article:

TOC

Now in the article, the same words display the html markup:
article

Here is a detail of the title:
title

And here is a detail of the citeation:
cite

The formatting was introduced in the import process through a generated xml document form the old site (this is the original article: http://www3.uah.es/dianas/journal/dianas-2013-2-1-e20130301 ). The xml exporter was custom made for this site, but the xml generated is now fully compatible with the OJS importer.

Thanks for your interest and help!

Hello @adguah

I see that you have commented on this issue: Inconsistent HTML display in article titles · Issue #2564 · pkp/pkp-lib · GitHub (at least I think this is you). This issue is still open, and as you’ve likely seen, there’s considerable discussion on the merits and issues associated with storing HTML in title fields (e.g. implications for sharing with third-party services). So, presently, it is not possible to do this, but given that the issue is still open and is on the radar of many of our developers it will likely be addressed in a future version of OJS.

-Roger

Thanks Roger @rcgillis,
Yes, it’s me on GitHub. I’ve been reading most of the comments.
I had to face the same problem when developing the software for my sites.
My solution was to keep two fields for the title (and two also for the summary), one without formats and the other with html formats, the latter used only when needed. With this trick I can show the reader the title and summary correctly formatted but keeping the full functionality for text searches or other actions.
In my sites, articles are saved as plain text with tag-delimited fields, using a superset of medline tags. Content can be exported (and imported) directly in medline format. When necessary, I have made translators to (and from) other formats, such as the last one for OJS xml.
I already have in mind a way to solve the problem of the formats in the title in OJS. I will comment on the forums when it is operational.
Thanks again,
Alberto

About this point, I think that the approach should not be if it is convenient or not, but if it is necessary, and in a general jounal manager, in my opinion and experience in Sciences, this characteristic is essential. It is not an aesthetic whim but the correct way to write certain things.
In my opinion as a totally novice OJS user, this is a fundamental shortcoming, not a minor inconvenience.

1 Like

Hello @adguah,

I don’t doubt that this would be a valuable option to have, nor do I doubt its utility for the sciences (and other disciplines too). But, the fact of the matter is that it may not be a simple fix - our developers have to assess the implications of storing HTML in a metadata field (whether an additional field or the same one) in a way that does not have significant implications for the rest of the software. Our developers will see your comment in the Github issue and take it into account. I’m hopeful that such a feature will get implemented in a future version of OJS.

Best regards,

Roger

Hi Roger @rcgillis,
I am trying to use the Custom Header Plugin to solve the display part of the problem by some javascript.
I have no experience with this plugiin. So far, I have been able to load an extenal javascript file. I tried to introduce javascript code directly but this is not allowed, apparently.
The script is loaded, I can find it in the page source, but it is not executed.
I reduced the code to a simple alert(‘hello!’); and still it is not executed.
Could you help me with this!
Tanks,
Alberto

Hello @adguah,

Please have a look at this blog post here https://pkp.sfu.ca/2018/03/01/enriching-ojs-omp-with-javascript-no-coding-required/,

As well as this forum post: Use Case/Examples for Custom header plugin for OJS - #19 by Carlos_Alberto_Rivad - for some tips around troubleshooting this plugin.

-Roger

Thanks @rcgillis
I consulted both sources to learn about the Custom Header Plugin. The second actually shows two cases of inclusion of an external script. I am able to reproduce this without problems, so everything is OK up to this point.

I posted a question to the first thread