6 Replies Latest reply on Jun 10, 2015 10:19 AM by JADarnell

    Why are semicolons not showing up in my exported text?

    JADarnell Level 1

      I have a Javascript that pulls out the text from a document and places it in a special file for further use in an HTML web page.  Because it is going into an HTML web page I am encoding special characters to make sure they are not misinterpreted by the web engine.  For example, if my script comes across a period, it replaces the period with "." (without the quotes).  If it comes across an equal sign it replaces the equal sign with "@" (without the quotes). And so on.

       

      The problem is that when I write the text to a file, the semicolons disappear.  The HTML engine  no longer sees a special code and it prints out the remaining letters of the special code, such as "&#46" or "&#64" (without the quotes).  I have tried various workarounds but none of them fix the problem.

       

       

      This is how the table looks in the script:

       

       

      var table = ["?NUL ",   "?SOH ",    "?STX ",  

                   "?ETX ",   "?EOT ",    "?ENQ ",  

                   "?ACK ",   "?BEL ",    "?BS ",   

                   "?HT ",    "?LF ",     "?VT ",   

                   "?FF ",    "?CR ",     "?SO ",   

                   "?SI ",    "?DLE ",    "?DC1 ",  

                   "?DC2 ",   "?DC3 ",    "?DC4 ",  

                   "?NAK ",   "?SYN ",    "?ETB ",  

       

      and so on...

       

       

      The first thirty or so characters are prepended with a question mark so that the operator can quick-find them in the prose and remove them, if necessary.

       

       

      Does anyone have a suggestion as to how I might make this work?

       

       

      TIA!

       

      John