Export (0) Print
Expand All

ScriptQuote Element (View)

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements
Occurrences

Encodes a string to fit within JavaScript code. This element is used to render text from the server that must be interpreted as a quoted string.


<ScriptQuote
  NotAddingQuote = "TRUE" | "FALSE">
</ScriptQuote>

Attribute

Description

NotAddingQuote

Optional Boolean. TRUE to eliminate quotation marks for enclosing a string. The default value is FALSE.

Minimum: 0

Maximum: Unbounded

The ScriptQuote element performs the following conversions on its body text:

  • converts " to \"

  • converts \ to \\

  • converts CR to \r\CR (where CR is character code 13)

For example, the code <ScriptQuote>This is a test</ScriptQuote> returns "This is a test" because NotAddingQuote is not set to TRUE. The code <ScriptQuote NotAddingQuote="TRUE">This is a test</ScriptQuote>, however, returns This is a test, without quotation marks, because NotAddingQuote is set to TRUE. Note that in the second case, the string is not surrounded by quotation marks.

Show:
© 2014 Microsoft