home icon indicating copy to clipboard operation
home copied to clipboard

Handle XML-escapes in MD sections of nuspec

Open glooms opened this issue 3 years ago • 4 comments

Hi there, this is a question/feature request.

We encountered a problem when trying to do a release of our tool qlik-cli. The problem was that our release-notes contained something that looked like an XML-tag, in this case <webhookId>. No worries thought I and XML-escaped the trouble-making characters to &lt; and &gt; respectively.

But, now when I look at the release-notes I see that the XML-escaped characters aren't converted back to their proper values. Instead there I see:

qlik webhook edit &lt;webhookId&gt;

How are we supposed to handle these characters so they look nice in descriptions and release-notes? Could they be "unescaped" by the Chocolatey machinery perhaps or is there another way to do this that I've missed?

┆Issue is synchronized with this Gitlab issue by Unito

glooms avatar Nov 12 '21 12:11 glooms

Apologies for not responding to this issue sooner.

Unfortunately at the moment, it is not possible to make the characters < and > look nicely in the description. In the meantime, until we can handle this scenario, I would suggest using double arrows instead as an alternative: « and ».

AdmiringWorm avatar Jun 30 '22 11:06 AdmiringWorm

@st3phhays Can you shed any light on what the options are of fixing this?

pauby avatar Jun 30 '22 11:06 pauby

Without digging into the code, I can think of two solutions:

  1. The conversion of markdown to HTML here is handled by Markdig. There may be something in Markdig that we can adjust to accommodate this and other special cases.
  2. I could use JavaScript after the fact and replace these characters with the correct ones.

st3phhays avatar Jun 30 '22 13:06 st3phhays

I'd rather option 1 than 2.

pauby avatar Jun 30 '22 13:06 pauby