PowerApps 中的 EncodeUrl 和 PlainText 函数EncodeUrl and PlainText functions in PowerApps

编码和解码字符串。Encodes and decodes strings.


EncodeUrl 函数会对 URL 字符串进行编码,将非字母数字字符替换为 % 和十六进制数字。The EncodeUrl function encodes a URL string, replacing non-alphanumeric characters with % and a hexadecimal number.

PlainText 函数会删除 HTML 和 XML 标记,将这类标记转换为相应的符号:The PlainText function removes HTML and XML tags, converting tags such as these to an appropriate symbol:

  • ""

这些函数的返回值是已编码或已解码的字符串。The return value from these functions is the encoded or decoded string.


EncodeUrl( String )EncodeUrl( String )

  • String - 必需。String - Required. 要编码的 URL。URL to be encoded.

PlainText( String )PlainText( String )

  • String - 必需。String - Required. 将从中去除 HTML 和 XML 标记的字符串。String from which HTML and XML tags will be stripped.


如果文本库中显示 RSS 源,然后将该库中标签的 Text 属性设置为 ThisItem.description,该标签可能会显示原始的 HTML 或 XML 代码,如此示例所示:If you show an RSS feed in a text gallery and then set the Text property of a label in that gallery to ThisItem.description, the label might show raw HTML or XML code as in this example:

<p>We have done an unusually&nbsp;&quot;deep&quot; globalization and localization.<p>

如果将标签的 Text 属性设置为 PlainText(ThisItem.description),将如此示例中所示显示文本:If you set the Text property of the label to PlainText(ThisItem.description), the text appears as in this example:

We have done an unusually "deep" globalization and localization.