Emojis are not retrieved properly when used inside macro

XMLWordPrintable

    • Severity 3 - Minor
    • 1

      Issue Summary

      When inserting emojis into dynamic content macros and retrieving them (styled view, view and editor) via the REST API, a few emojis are returned as an error placeholder message

      Steps to Reproduce

      1. Add a dynamic content macro (panels) to a page (aura, viz by optics, info panel (native))
      2. Insert emojis in the macro body (tested with (“flag_on”) and (“computer”) )  and few others
      3. Grab the storage format for the macro body
      4. Use the Get macro body by macro ID REST API
      5. Check the result, the img attribute will have the wrong src URL.
      <p local-id=\"d012d7e9-37e4-45be-8d40-aac458d83014\"><img src=\"https://mysite.atlassian.net/wiki/plugins/servlet/confluence/placeholder/error?i18nKey=editor.placeholder.error&locale=en_GB&version=2\" title=\"Cannot invoke &quot;String.indexOf(int)&quot; because &quot;href&quot; is null\" class=\"transform-error\" data-encoded-xml=\"%3Cac%3Aemoticon+ac%3Aname%3D%22flag-on%22+ac%3Aemoji-shortname%3D%22%3Aflag_on%3A%22+ac%3Aemoji-id%3D%22atlassian-flag_on%22+ac%3Alocal-id%3D%222156c095-4d41-408c-9960-9e47952b2679%22+ac%3Aemoji-fallback%3D%22%3Aflag_on%3A%22+%2F%3E\" /> </p><p local-id=\"b4eae5c8-b40c-4384-ad9c-efa710b203ab\"><img src=\"https://mysite.atlassian.net/wiki/plugins/servlet/confluence/placeholder/error?i18nKey=editor.placeholder.error&locale=en_GB&version=2\" title=\"Cannot invoke &quot;String.indexOf(int)&quot; because &quot;href&quot; is null\" class=\"transform-error\" data-encoded-xml=\"%3Cac%3Aemoticon+ac%3Aname%3D%22computer%22+ac%3Aemoji-shortname%3D%22%3Acomputer%3A%22+ac%3Aemoji-id%3D%221f4bb%22+ac%3Alocal-id%3D%2207d7e468-39dc-4a89-b739-a1d3ae6a7953%22+ac%3Aemoji-fallback%3D%22%F0%9F%92%BB%22+%2F%3E\" /> </p><p local-id=\"12a84e10-b657-4aa0-85b2-9401217149da\"><img class=\"emoticon emoticon-smile\" data-emoji-id=\"1f642\" data-emoji-shortname=\":slight_smile:\" data-emoji-fallback=\"🙂\" src=\"/wiki/s/487588862/6452/5cd4c4ed5f726d4fcf1a51b9981c4ccad023f2e6/_/images/icons/emoticons/smile.png\" width=\"16\" height=\"16\" data-emoticon-name=\"smile\" alt=\"(smile)\" /> </p><p local-id=\"349108b0-647d-49f2-a4d1-f9c796a435e3\"><img src=\"https://mysite.atlassian.net/wiki/plugins/servlet/confluence/placeholder/error?i18nKey=editor.placeholder.error&locale=en_GB&version=2\" title=\"Cannot invoke &quot;String.indexOf(int)&quot; because &quot;href&quot; is null\" class=\"transform-error\" data-encoded-xml=\"%3Cac%3Aemoticon+ac%3Aname%3D%22monitor%22+ac%3Aemoji-shortname%3D%22%3Adesktop%3A%22+ac%3Aemoji-id%3D%221f5a5%22+ac%3Alocal-id%3D%229b6b0a20-5f21-4ac0-b2d1-558729171da9%22+ac%3Aemoji-fallback%3D%22%F0%9F%96%A5%EF%B8%8F%22+%2F%3E\" /> </p><p local-id=\"fe0d7a36-8313-4ab0-aeaf-a32be46b5fb3\">✈️</p><p local-id=\"bf5bdfef-592b-4ee8-b42b-8a926b3c458d\">🖥️</p></div></body></html>" 

       

      Expected Results

      The converted styled view refers to the correct URL as the img src. Note that any legacy format, including view and editor, will encounter the same issue.

      Actual Results

      The converted styled view (view or editor) refers to the wrong URL.

      Workaround

      Currently, there is no known workaround for this behaviour. A workaround will be added here when available

              Assignee:
              Unassigned
              Reporter:
              Ramachandran N
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: