Closed Vensberg closed 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.
I can scrape script tags and render has HTML, should improve some of these, like the above example.
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.
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.
@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.
Example: https://sandbox.experts.ucdavis.edu/work/3178763