Lasso Soft Inc. > Home

[encode_stricthtml]

Linkencode_stricthtml
AuthorJason Huck
CategoryEncoding
Version8.x
Licensehttp://opensource.org/licenses/artistic-license.php
Posted03 Mar 2006
Updated03 Mar 2006
More by this author...

Description

This tag forces all characters in the given string to be HTML-encoded, instead of just the ones that most commonly require it, as [encode_html] does.

Sample Usage

encode_stricthtml('Hello, world!');

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

define_tag(
	'stricthtml',
	-namespace='encode_',
	-required='in',
	-priority='replace',
	-description='Encodes all characters in the given string to their HTML equivalents.'
);
	local('out' = string);
	
	iterate(#in, local('i'));
		#out += '&#' + #i->integer(1) + ';';
	/iterate;
	
	return(@#out);
/define_tag;

Related Tags

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft