Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow HTML in collection descriptions #337

Open
anjackson opened this issue Nov 3, 2021 · 1 comment
Open

Allow HTML in collection descriptions #337

anjackson opened this issue Nov 3, 2021 · 1 comment
Assignees
Labels

Comments

@anjackson
Copy link
Contributor

I can see from querying the Collections Solr that some collections have HTML in them, e.g.

<doc>
   <str name="id">31</str>
   <str name="type">collection</str>
   <str name="name">Athletics</str>
   <str name="description">
Sites and social media of UK competitors in athletics events at the Games.<ul><li><a href="https://webarchive.org.uk/wayback/archive/20140803052825/http://chrissyo.com/">[ARCHIVED] Christine Ohuruogu</a></li> <li><a href="https://webarchive.org.uk/wayback/archive/20140803052824/http://www.martynrooney.com/">[ARCHIVED] Martyn Rooney</a></li> <li><a href="https://webarchive.org.uk/wayback/archive/20140801052323/http://www.aleddavies-f42.co.uk/">[ARCHIVED] Aled Davies MBE</a></li> </ul>
   </str>
   <long name="parentId">21</long>
</doc>

But it looks like the HTML is getting stripped out when rendering it: https://www.webarchive.org.uk/en/ukwa/collection/31

I expect Play is automatically doing this, as that is considered best practice. Usually in this situation, you have to tell the templating system that this content is trusted and therefore that it's safe to include it as-is.

@nicolabingham
Copy link

Thanks for raising this ticket @anjackson, I have another example. The HTML in the description in ACT works (so I know my mark up is correct, thanks to @min2ha :) https://www.webarchive.org.uk/act/collections/2912 but the HTML has not made it through to the Collection description on https://www.webarchive.org.uk/en/ukwa/collection/2912

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants