openlibhums / janeway

A web-based platform for publishing journals, preprints, conference proceedings, and books
https://janeway.systems/
GNU Affero General Public License v3.0
172 stars 65 forks source link

Junk code in abstract field breaks metadata modal #3661

Closed justingonder closed 1 year ago

justingonder commented 1 year ago

Describe the bug Just fixed a case where an author had (apparently) pasted in their abstract with a bunch of hidden junk code (see attached). When the editor was on the Typesetting Plugin page and clicked View Metadata, the metadata modal rendered, but the Edit Metadata button and the 'X' icon to close the modal were not clickable. Removing the problematic text resolved the problem.

Janeway version 1.5

To Reproduce Steps to reproduce the behavior: Place the attached abstract text into any item, and from the Typesetting Plugin page for the item, click View Metadata. Try clicking on Edit Metadata or try closing the modal.

Expected behavior Junk in pasted text is always going to be a problem, but ideally it should never break the page.

abstract.txt

ajrbyers commented 1 year ago

Thanks for this Justin. We have PR in for 1.5.1 that will strip this sort of thing out of abstracts.

https://github.com/BirkbeckCTP/janeway/pull/3446