Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 01330ec25d
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (39 sloc) 1.107 kb
__NAME__ purpose
return a string for use in JavaScript, quoted, without variables substituted
__END__
__NAME__ synopsis
&TAG_CONTAINER_0_0;
__END__
__NAME__ see also
jsq
__END__
__NAME__ author
&mheins;, &ICDEVGROUP;
__END__
__NAME__ description
<tag>jsqn</tag> tag quotes (escapes) strings (without performing variable
substitution), for use in JavaScript code blocks.
</para><para>
This is mostly used for long strings which are hard to prepare manually.
__END__
__NAME__ example: Basic example
Here's an example of JavaScript code and the output it would generate,
once expanded by Interchange:
<programlisting><![CDATA[
<script>
var astring = 'just an insert';
var somevar = [jsqn] Big long string you don't
want to have to quote for JS, and you don't want to
insert the variable $astring.[/jsqn];
</script>
]]></programlisting>
Expands to:
<programlisting><![CDATA[
<script>
var astring = 'just an insert';
var somevar = " Big long string you don't" +
' want to have to quote for JS, and you don't want to' +
' insert the variable $astring.';
</script>
]]></programlisting>
__END__
Jump to Line
Something went wrong with that request. Please try again.