Chapter Contents

Previous

Next
HTMLENCODE

HTMLENCODE



Encodes characters using HTML character entity references and returns the encoded string

Category: Web Tools


Syntax
Arguments
Details
Examples
See Also

Syntax

HTMLENCODE(argument)

Arguments

argument
specifies any character expression.


Details

HTMLENCODE can encode the following three characters:

Character encodes as ...
& &
< &lt;
> &gt;

Note:   The encoded string may be longer than the original string. Ensure that you consider the additional length when you use this function.   [cautionend]


Examples

SAS Statements Results
x1=htmlencode ('not a <tag>');
put x1;
  
not a &lt;tag&gt;
x2=htmlencode ('&');
put x2;
   
&amp;
x3=htmlencode ('normal text');
put x3;
   
normal text


See Also

Function:

HTMLDECODE


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.