ucd-library / rp-ucd-client

Client application for UCD Davis Library research profiles
MIT License
0 stars 0 forks source link

Subscripts are not being rendered correctly #184

Closed Vensberg closed 3 years ago

Vensberg commented 3 years ago

Example: https://sandbox.experts.ucdavis.edu/work/3178763

qjhart commented 3 years ago

@Vensberg I'm not sure on the best way to handle this. Different citation sources use different methodologies for rendering this type of material, and I don't think we can support them all. For example see how the title is rendered differently in the citation sources for this article, https://oapolicy.universityofcalifornia.edu/viewobject.html?id=3178763&cid=1. That being said,if we wanted to support some formats, this would be the first choice IMO.

jrmerz commented 3 years ago

I can scrape script tags and render has HTML, should improve some of these, like the above example.

jrmerz commented 3 years ago

Dev notes. This issue is going to include the addition of a sanitize-html wrapper library that wraps both the sanitize-html library and lit-html/directives/unsafe-html. lit-html/directives/unsafe-html should never be directly used, use src/lib/santize-html instead.

Vensberg commented 3 years ago

Looks good. I understand that now all subscripts will not be formatted with this changes, but it takes care of the ones that stand out. We can discuss revisiting other subscript formats at a later time.

jrmerz commented 3 years ago

@Vensberg just clarifying, if they have used HTML tags, we will attempt to render (we strip some tags for safety). If they use other markup, including non-HTML (XML) tags (though unsupported XML will be removed), we will render as is.