Search code examples
azure-devops-extensions

HTML encoding issue in azure devops extension


I'm working on an hub ms.vss-web.hub extension for azure devops and I'm facing emoji rendering issue (text is within a diff monaco text editor)

enter image description here

looking at the html source, the emoji is not rendered as well enter image description here

during development, I was using baseUri (https://learn.microsoft.com/en-us/azure/devops/extend/develop/manifest?view=azure-devops#runtime-attributes) and it was working as expected.

(below, display & source in devops, but with extension served from my laptop) enter image description here

  • emoji rendering is failing in all parts of the page, not only monaco editor (I would exclude monaco editor from suspects)
  • html page is correctly in UTF8
  • I've checked html page after tfx extension create process (unzip) and encoding & emoji were still ok

I suspect an intermediate process done by devops while rendering.


Solution

  • I forced UTF8 with BOM rather only UTF8 and it fixed the issue.

    enter image description here