Property Binding with Special Characters

  • mgerber
    Participant
      4 years, 6 months ago #24361

      Hello,

      I’m using a Label with Property Binding:

      But the result shows no special Characters like ‘&’:

       

      Is there a possibility to show the right characters?

      Attachments:
      You must be logged in to view attached files.
      Jennifer Häfner
      Moderator
        Has successfully completed the online course Intermediate (200)
        Has successfully completed the online course Advanced (300)
        Has successfully completed the online course Basics (100)
        Has successfully completed the online course Advanced (310)
        Has successfully completed the online course Advanced (320)
        Has successfully completed the Intermediate Certification
        Has successfully completed the Advanced Certification
      4 years, 6 months ago #24378
      Up
      1
      Down
      ::

      Hi,

      I assume that you retrieve the text that you want to display from some kind of data source using a connector. Is the text retrieved correctly and just displayed in the wrong format or is the connector output already in the wrong format?

      Kahn
      Moderator
        Has successfully completed the online course Introduction
        Has successfully completed the online course Intermediate (200)
        Has successfully completed the online course Advanced (300)
      4 years, 6 months ago #24381
      Up
      1
      Down
      ::

      Hello mgerber,

      please try the following notation (\u0000 – \uFFFF) instead of the HTML notation &.

      mgerber
      Participant
        4 years, 6 months ago #24383
        Up
        1
        Down
        ::

        Problem solved:

        The data is coming from an XML input, so the Special characters ar replaced in XML. A simple BO with a function solved my problem…

         

        function replaceCharsFromXML(inpStr){
        var outStr = inpStr.replace(/&/g, ‘&’);
        outStr = outStr.replace(/"/g, ‘”‘);
        outStr = outStr.replace(/&lt;/g, ‘<‘);
        outStr = outStr.replace(/&gt;/g, ‘>’);
        outStr = outStr.replace(/&apos;/g, ‘\”);
        outStr = outStr.replace(/Ä/g, ‘Ä’);
        outStr = outStr.replace(/Ö/g, ‘Ö’);
        outStr = outStr.replace(/Ü/g, ‘Ü’);
        outStr = outStr.replace(/ä/g, ‘ä’);
        outStr = outStr.replace(/ö/g, ‘ö’);
        outStr = outStr.replace(/ü/g, ‘Ü’);
        outStr = outStr.replace(/ß/g, ‘ß’);
        return outStr;
        }

         

      Viewing 4 posts - 1 through 4 (of 4 total)

      You must be logged in to reply to this topic.