NEU-Libraries / cerberus

Digital Repository Service
8 stars 0 forks source link

MODS Display treating angle brackets differently in mods:title and mods:abstract #1093

Closed sarahjeansweeney closed 7 years ago

sarahjeansweeney commented 7 years ago

Kevin is cataloging Abbie's master's thesis: https://repository.library.northeastern.edu/files/neu:cj82pr45x

Her theses title and abstract includes text that mimics XML, which is encoded in the mods:title and mods:abstract fields as

XM<LGBT/>

They both display differently. mods:title displays as expected, but mods:abstract strips out the angle brackets and everything in between, presumably because it's being treated as if it's an actual XML element?

2017-04-06_1558

The preferred behavior is that of mods:title. Is there a reason why these fields treat the referenced angle brackets differently?

dgcliff commented 7 years ago

It'll most likely have to do with HTML safety. Rails by default tries to prevent malicious code injection. I'll look to see what I can do.

dgcliff commented 7 years ago

It's looking like Mods Display itself is causing the issue. Looking into it more.

dgcliff commented 7 years ago

Well, it goes deeper. It appears to be an https://github.com/projecthydra/om effect

2.0.0 :013 > x.mods.abstract[0]
 => "This thesis analyzes three case studies of LGBTAQ identifying writing center tutors. The methodology focuses on using a \"queer\" XML encoding language for analysis, called XM<LGBT/>."
2.0.0 :014 > x.mods.title[0]
 => "XM&lt;LGBT/&gt;"

Which may mean it's very hard to cure

dgcliff commented 7 years ago

Annnd no it's not

Title was using XM&amp;lt;LGBT/&amp;gt; abstract was using XM&lt;LGBT/&gt;