HL7 / fhir-ig-publisher

Source code for the IG publisher
Apache License 2.0
69 stars 57 forks source link

HTML entities are exposed in p#publish-box #299

Open masnick opened 3 years ago

masnick commented 3 years ago

We have an IG with a & in the title. Within #publish-box, this appears as an exposed HTML entity rather than &:

image

(Note that this appears fixed in the CI build of our IG as we are cleaning this up with JavaScript.)

lmckenzi commented 2 years ago

Seems to now be fixed

masnick commented 2 years ago

@lmckenzi is there any update on a fix for this? I'm currently working around this with an ugly JavaScript hack that I would like to remove before publication:

<script>
document.addEventListener("DOMContentLoaded", function() {
if(document.getElementById('publish-box')) $("#publish-box").html($("#publish-box").html().replace('amp;', ''));
});
</script>
lmckenzi commented 1 year ago

We believe this has been fixed. If there's still an issue, please point to a current place where the issue is visible.

masnick commented 1 year ago

This is still appearing in a fresh CI build of https://github.com/HL7/fhir-shc-vaccination-ig.

NOTE: you will need to disable JavaScript to see this as I have hacked around the bug with the JavaScript above

image

You can also verify this with curl or similar:

$ curl -s http://build.fhir.org/ig/HL7/fhir-shc-vaccination-ig/branches/master/index.html | grep "&amp;"
...
  <!--ReleaseHeader--><p id="publish-box">SMART Health Cards: Vaccination &amp;amp; Testing Implementation Guide, published by HL7 International - Public Health Work Group.
...

Note the &amp;amp; above.

masnick commented 1 year ago

I remembered that this was still an issue just now, so I checked again and it's still happening:

curl -s http://build.fhir.org/ig/HL7/fhir-shc-vaccination-ig/branches/master/index.html | grep "&amp;amp"
  <!--ReleaseHeader--><p id="publish-box">SMART Health Cards: Vaccination &amp;amp; Testing Implementation Guide, published by HL7 International - Public Health Work Group. This is not an authorized publication; it is the continuous build for version 0.6.2). This version is based on the current content of <a href="https://github.com/HL7/fhir-shc-vaccination-ig/">https://github.com/HL7/fhir-shc-vaccination-ig/</a> and changes regularly. See the <a href="http://hl7.org/fhir/uv/shc-vaccination/history.html">Directory of published versions</a></p><!--EndReleaseHeader-->

Note &amp;amp; above -- this should be &amp;.