I recently updated our journal from OJS 3.1.1.0 to 3.1.2.1. The editors noticed they cannot adjust the formatting of references on the article metadata page anymore. There is no WYSIWYG editor. The references of old articles have HTML tags and the new ones are as plaintext. The problem is that now they have to manually insert HTML tags into the references.
My question is what is the intended workflow for formatting references (i.e. italic font) for the view in the article page? Can I change behaviour of the extracting algorithm for certain parts of the reference to style it (i.e. name of the source in italic)? Or apply our CSL style to the extracted references?
Hi, I found a bug when the citation has URL not in <a href=… but simple in text link and the whole citation is encapsuled in <p></p>. The regex doesn’t catch the last > from </p>.
I’ve been playing around with it. Your regex works perfectly if the user puts “.” at the end of each citation. When it’s missing the the extraction returns this:
The previous regex with added most frequent closing line tags (</p>, </li>, </div>) works even when the dot at the end is missing.
I forgot in the previous code to put the </li>. So in my installation I currently use this.
Hrm, I’m sure there’s a way to do this with a pure regular expression, but I couldn’t manage it without more unwanted behavior. Please try this in place of the preg_replace call and let me know if it resolves all issues?
Thanks for your help testing this, I don’t have a representative dataset on hand
Changing the ? to a + might have unwanted side-effects; I’ve fine-tuned the regular expression to be pickier about the protocol clause of the URL (which is the effect your change had) and come up with this: