Skip to content

Commit c0ea985

Browse files
Merge pull request SharePoint#8851 from andrewconnell/content-cleanup/scrub-br-tags
Content cleanup/scrub <br> tags
2 parents d8e41b8 + 9886fc3 commit c0ea985

29 files changed

+1118
-1311
lines changed

docs/apis/migration-api-overview.md

Lines changed: 92 additions & 60 deletions
Large diffs are not rendered by default.

docs/general-development/optimize-page-performance-in-sharepoint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Optimize page performance in SharePoint
33
description: Learn about features to improve performance in SharePoint pages and enhance experiences in geographically distributed implementations.
4-
ms.date: 06/13/2022
4+
ms.date: 03/28/2023
55
ms.assetid: 262caeef-64fd-4e02-b947-d772faf01159
66
ms.localizationpriority: high
77
---
@@ -243,7 +243,7 @@ To use MDS, controls and web parts have to register page resources by using the
243243

244244
| Common practice for rendering content | MDS-compliant alternative |
245245
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- |
246-
| `output.Write("<input type=\\"hidden\\" name=\\"");`<br>`output.Write(SPHttpUtility.NoEncode("HiddenField));`<br/>`output.Write("\\" value=\\"");`<br/>`output.Write(DigestValue);`<br/>`output.Write("\\" />");` | `SPPageContentManager.RegisterHiddenField(this, "HiddenField", DigestValue);` |
246+
| `output.Write("<input type=\\"hidden\\" name=\\"");`<br />`output.Write(SPHttpUtility.NoEncode("HiddenField));`<br />`output.Write("\\" value=\\"");`<br />`output.Write(DigestValue);`<br />`output.Write("\\" />");` | `SPPageContentManager.RegisterHiddenField(this, "HiddenField", DigestValue);` |
247247
| `Page.ClientScript.RegisterClientScriptBlock(typeof(MyType), "MyKey", "var myvar=1", true);` | `SPPageContentManager.RegisterClientScriptBlock(this, typeof(MyType), "MyKey", "var myvar=1");` |
248248

249249
> [!NOTE]

docs/schema/beginswith-element-query.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: BeginsWith element (Query)
33
manager: soliver
4-
ms.date: 3/9/2015
4+
ms.date: 03/28/2023
55
ms.audience: Developer
66
ms.topic: reference
77
ms.localizationpriority: medium
@@ -62,8 +62,12 @@ The following example uses the **BeginsWith** element within a string that is as
6262
SPWeb mySite = SPControl.GetContextWeb(Context);
6363
SPList list = mySite.Lists["List_Name "];
6464
SPQuery query = new SPQuery();
65-
query.Query = "<Where><BeginsWith><FieldRef Name="Journal"/>" +
66-
"<Value Type="Note">City</Value></BeginsWith></Where>";
65+
query.Query = "<Where>" +
66+
"<BeginsWith>" +
67+
"<FieldRef Name="Journal"/>" +
68+
"<Value Type="Note">City</Value>" +
69+
"</BeginsWith>" +
70+
"</Where>";
6771
SPListItemCollection myItems = list.GetItems(query);
6872
foreach (SPListItem item in myItems)
6973
{

docs/schema/column-element-view.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Column element (View)
33
manager: soliver
4-
ms.date: 3/9/2015
4+
ms.date: 03/28/2023
55
ms.audience: Developer
66
ms.topic: reference
77
ms.localizationpriority: medium
@@ -24,15 +24,15 @@ Returns the raw data value for a particular field, as opposed to the formatted v
2424
AutoHyperLink = "TRUE" | "FALSE"
2525
AutoHyperLinkNoEncoding = "TRUE" | "FALSE"
2626
AutoNewLine = "TRUE" | "FALSE"
27-
Default = "Text"
27+
Default = "Text"
2828
Format="DateTime"
29-
HTMLEncode = "TRUE" | "FALSE"
30-
Name = "Text"
31-
ShowField = "Text"
32-
StripWS = "TRUE" | "FALSE"
29+
HTMLEncode = "TRUE" | "FALSE"
30+
Name = "Text"
31+
ShowField = "Text"
32+
StripWS = "TRUE" | "FALSE"
3333
SubColumnNumber = Integer
34-
URLEncode = "TRUE" | "FALSE"
35-
URLEncodeAsURL = "TRUE" | "FALSE">
34+
URLEncode = "TRUE" | "FALSE"
35+
URLEncodeAsURL = "TRUE" | "FALSE">
3636
</Column>
3737
```
3838

@@ -42,20 +42,20 @@ The following sections describe attributes, child elements, and parent elements.
4242

4343
### Attributes
4444

45-
|**Attribute**|**Description**|
46-
|:-----|:-----|
47-
|**AutoHyperLink** <br/> |Optional **Boolean**. **TRUE** to surround text with `<A>` tags if the text appears like a hyperlink (for example, `www.microsoft.com`). <br/> |
48-
|**AutoHyperLinkNoEncoding** <br/> |Optional **Boolean**. **TRUE** to surround text with `<A>` tags if the text appears like a hyperlink (for example, `www.microsoft.com`) but without HTML encoding. <br/> |
49-
|**AutoNewLine** <br/> |Optional **Boolean**. **TRUE** to insert `<BR>` tags into the text stream and to replace multiple spaces with a nonbreaking space (`&nbsp;`). <br/> |
50-
|**Default** <br/> |Optional **Text**. Renders the text assigned to this attribute if the value returned by a selection is an empty string (`""`). <br/> |
51-
|**Format** <br/> |Optional **Text**. Controls the date formatting for date fields. Supported formats include **DateTime**, **DateOnly**, **TimeOnly**, **ISO8601**, **ISO8601Basic**, and **ISO8601Gregorian**. <br/> |
52-
|**HTMLEncode** <br/> |Optional **Boolean**. **TRUE** to convert embedded characters so that they are displayed as text in the browser. In other words, characters that could be confused with HTML tags are converted to entities. <br/> |
53-
|**Name** <br/> |Optional **Text**. Allows the **Column** element to be used outside the field rendering context by supplying an ID (for example, `<Column Name="`_ID_`"/>`). <br/> |
54-
|**ShowField** <br/> |Optional **Text**. The **ShowField** attribute can be set to the column name to display. By default, a hyperlinked text from the **Title** column of the record in the external list is displayed. But the **ShowField** attribute can be used to override that and display another field from the external list. <br/> The following data types are allowed as targets of a **ShowField** attribute: **Text**, **Choice**, and **Counter**. <br/> |
55-
|**StripWS** <br/> |Optional **Boolean**. **TRUE** to remove white space from the beginning and end of the value returned by the element. <br/> |
56-
|**SubColumnNumber** <br/> |Optional **Integer**. <br/> |
57-
|**URLEncode** <br/> |Optional **Boolean**. **TRUE** to convert special characters, such as spaces, to quoted UTF-8 format (for example, `%c3%ab` for character `ë`). <br/> |
58-
|**URLEncodeAsURL** <br/> |Optional **Boolean**. Like **URLEncode**, but **TRUE** to specify that the string to encode is a path component of a URL so that forward slashes (`/`) are not encoded. <br/> |
45+
| **Attribute** | **Description** |
46+
| :-------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
47+
| **AutoHyperLink** | Optional **Boolean**. **TRUE** to surround text with `<A>` tags if the text appears like a hyperlink (for example, `www.microsoft.com`). |
48+
| **AutoHyperLinkNoEncoding** | Optional **Boolean**. **TRUE** to surround text with `<A>` tags if the text appears like a hyperlink (for example, `www.microsoft.com`) but without HTML encoding. |
49+
| **AutoNewLine** | Optional **Boolean**. **TRUE** to insert `<BR>` tags into the text stream and to replace multiple spaces with a nonbreaking space (`&nbsp;`). |
50+
| **Default** | Optional **Text**. Renders the text assigned to this attribute if the value returned by a selection is an empty string (`""`). |
51+
| **Format** | Optional **Text**. Controls the date formatting for date fields. Supported formats include **DateTime**, **DateOnly**, **TimeOnly**, **ISO8601**, **ISO8601Basic**, and **ISO8601Gregorian**. |
52+
| **HTMLEncode** | Optional **Boolean**. **TRUE** to convert embedded characters so that they're displayed as text in the browser. In other words, characters that could be confused with HTML tags are converted to entities. |
53+
| **Name** | Optional **Text**. Allows the **Column** element to be used outside the field rendering context by supplying an ID (for example, `<Column Name="_ID_"/>`). |
54+
| **ShowField** | Optional **Text**. The **ShowField** attribute can be set to the column name to display. By default, a hyperlinked text from the **Title** column of the record in the external list is displayed. But the **ShowField** attribute can be used to override that and display another field from the external list. The following data types are allowed as targets of a **ShowField** attribute: **Text**, **Choice**, and **Counter**.|
55+
| **StripWS** | Optional **Boolean**. **TRUE** to remove white space from the beginning and end of the value returned by the element. |
56+
| **SubColumnNumber** | Optional **Integer**. |
57+
| **URLEncode** | Optional **Boolean**. **TRUE** to convert special characters, such as spaces, to quoted UTF-8 format (for example, `%c3%ab` for character `ë`). |
58+
| **URLEncodeAsURL** | Optional **Boolean**. Like **URLEncode**, but **TRUE** to specify that the string to encode is a path component of a URL so that forward slashes (`/`) aren't encoded. |
5959

6060
### Child elements
6161

@@ -72,7 +72,7 @@ Numerous
7272

7373
### Remarks
7474

75-
Note that when an empty **Column** element (`<Column/>`) is used, it is sensitive to the current setting of the `DisplayMode` variable. The display mode is set implicitly according to the current command being used.
75+
When an empty **Column** element (`<Column/>`) is used, it's sensitive to the current setting of the `DisplayMode` variable. The display mode is set implicitly according to the current command being used.
7676

7777
If a view or item is being displayed, `DisplayMode` is set to **Display**. If an item is being created from a form, `DisplayMode` is set to **New**. If an existing item is being edited, `DisplayMode` is set to **Edit**. The `DisplayMode` variable can be overridden in the page by setting it directly, for example, `<SetVar Name="DisplayMode">Edit</SetVar>`.
7878

0 commit comments

Comments
 (0)