|
![]() |
||||||||||||||
Primitive Data Types TutorialEncoding FunctionsWafl contains three encoding string functions. All of these functions share the same type: (String -> String). Function strEncodeHtml(s) returns string encoded for inclusion in HTML. All special characters are replaced with appropriate character sequences. Function strEncodeSql(s) returns string encoded for usage in SQL string literals. All special characters are replaced with appropriate escape sequences. Function strEncodeUri(s) returns string encoded for appearance in URI query values. All special characters are replaced with appropriate character sequences. NOTE: In the following example a double Source code:{# strEncodeHtml( "&<>" ), strEncodeSql( "'quotes'" ), strEncodeUri( "a + b = c" ) #} Result:{# "&<>", "''quotes''", "a%20%2B%20b%20%3D%20c" #}
|
|
||||||||||||||
© 2006 Saša Malkov | |||||||||||||||