This documentation is archived and is not being maintained.

ScriptQuote Element

SharePoint Team Services 1.1

The ScriptQuote element is used to encode a string to fit within JavaScript code. This element is used for rendering text from the server that must be interpreted as a quoted string.

Syntax

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

Attributes

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

Related Elements

Parent ElementsChild Elements
Case, Fields, ForEach, ListFormClosing, ListFormOpening, RenderPattern, Toolbar, ViewBody, ViewEmpty, ViewHeader, XMLColumn, Column2, FieldPrefix, GetVar, HTML, HttpHost, HttpVDir, ImagesPath, ListProperty, ListUrlDir, LocaleInfo, LookupColumn, Property, Switch, URL

Remarks

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)

Example

The code <ows:ScriptQuote>This is a test</ows:ScriptQuote> renders "This is a test" since NotAddingQuote is not set to TRUE. But the code <ows:ScriptQuote NotAddingQuote="TRUE">This is a test</ows:ScriptQuote> renders This is a test, without quotation marks, since NotAddingQuote is set to TRUE. Note that in the second case the string is not surrounded by quotation marks.


Show: