Module WmlEncode.pkg

     1//****************************************************************************//
     2//                                                                            //
     3// $File name  : WmlEncode.pkg                                                //
     4// $File title : WmlEncode global function                                    //
     5// Notice      :                                                              //
     6// $Author(s)  : John Tuohy                                                   //
     7//                                                                            //
     8// Confidential Trade Secret.                                                 //
     9// Copyright 2000 Data Access Corporation, Miami FL, USA                      //
    10// All Rights reserved                                                        //
    11// DataFlex is a registered trademark of Data Access Corporation.             //
    12// $Rev History                                                               //
    13//                                                                            //
    14// $Rev History                                                               //
    15//                                                                            //
    16//                                                                            //
    17//   10/2/00 jjt - created                                                    //
    18//****************************************************************************//
    19
    20
    21
    22Function wmlEncodeNoCrLf Global string sDat Returns string
    23       Move (Replaces("&",sDat,"&"))          to sDat // must do this first!
    24       Move (Replaces("<",sDat,"<"))           to sDat
    25       Move (Replaces(">",sDat,">"))           to sDat
    26       Move (Replaces('"',sDat,"""))         to sDat
    27       Move (Replaces("'",sDat,"'"))          to sDat // can't use apos
    28       Function_Return sDat
    29End_Function
    30
    31
    32Function wmlEncode Global string sDat Returns string
    33       Get WmlEncodeNoCrLF sDat to sDat
    34       Move (Replaces(character(10),sDat,""))     to sDat
    35       Move (Replaces(character(13),sDat,"
"
)) to sDat 36 Function_Return sDat 37End_Function 38 39 40