Lasso Soft Inc. > Home

[jina_encode_apos]

Linkjina_encode_apos
AuthorJolle Carlestam
CategoryEncoding
Version8.5.x
Licensehttp://opensource.org/licenses/artistic-license.php
Posted23 Mar 2007
Updated23 Mar 2007
More by this author...

Description

Useful when a text string will be placed within a javascript and it's possible that it contains an apostrophe. The string probably coming from a database search.

Sample Usage

jina_encode_apos: $aStringContainingAnApostrophe

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:'jina_encode_apos',
	-Required = 'textString',-copy,
	-encodenone;

/*	
	jina_encode_apos
        
	Authors: First attempt by Jolle Carlestam, refined by Bil Corry

	Created: 2007-03-22

	Description: Useful when a text string will be placed within a javascript
	and it's possible that it contains an apostrophe

	Version: 1.0

	Licence: Artistic http://opensource.org/licenses/artistic-license.php
*/
	#textString->(Replace: '\'', '\\\'');
	Return:#textString;
	
/Define_Tag;

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