Specifying special characters in the text property

简介: Specifying special characters in the text property The following rules specify how to include special characters in the text property of a text contr...

Specifying special characters in the text property

The following rules specify how to include special characters in the text property of a text control MXML tag, either in a property assignment, such as text="the text", or in the body of an <mx:text> subtag.

In standard text

The following rules determine how you use special characters if you do not use a CDATA section:

  • To use the special characters left angle bracket (<), right angle bracket (>), and ampersand (&), insert the XML character entity equivalents of &lt;, &gt;, and &amp;, respectively. You can also use &quot; and &apos; for double-quotation marks (") and single-quotation marks ('), and you can use numeric character references, such as &#165 for the Yen mark (¥). Do not use any other named character entities; Flex treats them as literal text.
  • You cannot use the character that encloses the property text string inside the string. If you surround the string in double-quotation marks ("), use the escape sequence \" for any double-quotation marks in the string. If you surround the string in single-quotation marks (') use the escape sequence \' for any single-quotation marks in the string. You can use single-quotation marks inside a string that is surrounded in double-quotation marks, and double-quotation marks inside a string that is surrounded in single-quotation marks.
  • Flex text controls ignore escape characters such as \t or \n in the text property. They ignore or convert to spaces, tabs and line breaks, depending on whether you are specifying a property assignment or an <mx:text> subtag. To include line breaks, put the text in a CDATA section. In the Text control text="string" attribute specifications, you can also specify them as numeric character entities, such as &#013; for a Return character or &#009; for a Tab character, but you cannot do this in an <mx:text> subtag.
相关文章
|
1月前
|
Java Spring
allowedOrigins cannot contain the special value "*"
allowedOrigins cannot contain the special value "*"
25 0
|
1月前
|
CDN
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
29 0
(standard input): No keywords in input file
(standard input): No keywords in input file
111 0
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
305 0
|
存储 JSON Linux
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (ch
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (ch
|
XML 数据格式
Do not concatenate text displayed with setText,use resource string with placeholders.
Do not concatenate text displayed with setText,use resource string with placeholders.
252 0
Do not concatenate text displayed with setText,use resource string with placeholders.
the title and note has maintained the same text type
the title and note has maintained the same text type
99 0
the title and note has maintained the same text type
the code place where the binding is converted to final value displayed in u
the code place where the binding is converted to final value displayed in u
116 0
the code place where the binding is converted to final value displayed in u
|
XML Java 数据库连接
Open quote is expected for attribute "{1}" associated with an element type "id".
Open quote is expected for attribute "{1}" associated with an element type "id".
187 0
Open quote is expected for attribute "{1}" associated with an element type "id".
Error saving your changes: Description control characters are not allowed
在修改 GitHub 上的仓库描述时出现此提示信息:Error saving your changes: Description control characters are not allowed 开始以为是 Fork 来的没有修改权限,但之前没有遇到这样的情况,提示信息说的也不是这个意思。
2370 0