WMLEncode
See Also: Web Application Helper Functions
Purpose
Returns a string encoded so that its content will not be interpreted by a WAP browser as special WML formatting characters. It also adds <br> to the end of each line.
Return Type
Syntax
Use WMLEncode.pkg
(WMLEncode({string-value}))
What It Does
Before field data is passed to an Active Server Page (ASP) file, you will often want to ensure that the data is properly encoded so that the text will not be interpreted by the WAP browser as special WML formatting characters.
Without some kind of conversion, embedded tags will be interpreted by your browser.
Examples
Procedure Test
string sText
// initialize sText with a string value
End_Procedure
Send WriteWml(
WMLEncode(sText)
)
Notes
The reason that most Write messages are not automatically encoded is so you can embed custom WML encoding in your output strings.
It is very important that you remember to encode your data, or your resulting WML output may be undesirable.