Announcement

Collapse
No announcement yet.

Replacing Escape characters - because theyre in my way (SOLVED)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replacing Escape characters - because theyre in my way (SOLVED)

    Hi - hopefully a super easy one for you Javascript/Mirth masters.

    I have set up a channel, and everything is working - but im importing into HTML, and the escape characters are causing me grief.

    I need to replace all "\.br" characters with HTML <br> characters - for purely selfish purposes....i just need the text block formatted the way it should be.

    Can anyone tell me what i should script into my pre-processor to do this?

    thanks
    Last edited by pacmano; 02-26-2021, 12:55 AM.

  • #2
    Moving your thread to support, this section is for the development of Mirth itself, not for developing channels on Mirth
    Diridium Technologies, Inc.
    https://diridium.com

    Comment


    • #3
      In the preprocessor:

      return message.replace(/\\\.br/g,"<br>")

      2021-02-25_13-18.png


      Last edited by pacmano; 02-25-2021, 10:18 AM.
      Diridium Technologies, Inc.
      https://diridium.com

      Comment


      • #4
        Thanks Pacmano - i did find this literally this morning in another post.

        Comment

        Working...
        X