Skip to content

Commit 3b9ad5c

Browse files
committed
Merged PR 88411: Fix html self closing issues
**Issue** Q&A elements are rendered in a wrong way. **Reason** Some div elements are marked with self-closing. According to the HTML5 spec, tags that cannot have any contents (known as void elements) can be self-closing*. This includes the following tags: **Resolution** _Only void elements can be self closing. from HTML5 spec, void elements are:_ area, base, br, col, embed, hr, img, input, link, meta, param, source, track, wbr **Copied from HTML5 SPEC:** Tags are used to delimit the start and end of elements in the markup. Raw text, escapable raw text, and normal elements have a start tag to indicate where they begin, and an end tag to indicate where they end. The start and end tags of certain normal elements can be omitted, as described below in the section on optional tags. Those that cannot be omitted must not be omitted. Void elements only have a start tag; end tags must not be specified for void elements. Foreign elements must either have a start tag and an end tag, or a start tag that is marked as self-closing, in which case they must not have an end tag. **References:** https://html.spec.whatwg.org/multipage/syntax.html#void-elements https://stackoverflow.com/questions/3558119/are-non-void-self-closing-tags-valid-in-html5 Related work items: #365457
1 parent c7bcf47 commit 3b9ad5c

8 files changed

+15
-15
lines changed

demo/code-demo/log_window.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
<img src="images\clear.png"/> Clear
99
</button>
1010
</div>
11-
<textarea id="txtResponse" class="responseTextArea" />
11+
<textarea id="txtResponse" class="responseTextArea"></textarea>
1212
</div>

demo/code-demo/settings_embed.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h4>Embed Report</h4>
44
</div>
55

66
<h8>Select mode to embed your report in:</h8>
7-
<div class="spacer" />
7+
<div class="spacer"></div>
88
<div id="modeSelector">
99
<div onclick="OpenViewMode();"><input type="radio" name="embedMode" value="view" checked="checked"> View mode </input></div>
1010
<div onclick="OpenEditMode();"><input type="radio" name="embedMode" value="edit"> Edit mode</input></div>
@@ -13,7 +13,7 @@ <h4>Embed Report</h4>
1313

1414
<div id="embedModeInput">
1515
<h8>Fill in the fields below to get the code to embed your report.</h8>
16-
<div class="spacer" />
16+
<div class="spacer"></div>
1717

1818
<div class="inputLine">
1919
<div class="inputLineTitle">Embed Token</div>
@@ -31,7 +31,7 @@ <h4>Embed Report</h4>
3131

3232
<div id="createModeInput">
3333
<h8>Fill in the fields below to get the code to embed your report.</h8>
34-
<div class="spacer" />
34+
<div class="spacer"></div>
3535

3636
<div class="inputLine">
3737
<div class="inputLineTitle">Embed Token</div>

demo/v2-demo/log_window.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
</button>
1010
</div>
1111
<div class="responseTextAreaWrapper">
12-
<textarea id="txtResponse" class="responseTextArea" />
12+
<textarea id="txtResponse" class="responseTextArea"></textarea>
1313
</div>
1414
</div>

demo/v2-demo/settings_embed_dashboard.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<span class="checkmark"></span></div>
1313
</label>
1414
</div>
15-
<div class="spacer" />
15+
<div class="spacer"></div>
1616
<div id="embedModeInput">
1717
<h8>Fill in the fields below to get the code to embed your dashboard.</h8>
18-
<div class="spacer" />
18+
<div class="spacer"></div>
1919

2020
<div class="inputLine">
2121
<div class="inputLineTitle">Embed Token</div>

demo/v2-demo/settings_embed_qna.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div id="qna-embed-table">
22
<div id="wrapper-settings-div">
33
<h8>Select mode to embed Q&A in:</h8>
4-
<div class="spacer" />
4+
<div class="spacer"></div>
55
<div id="modeSelector">
66
<label class="radioContainer">
77
<div onclick="ToggleQuestionBox(false);"><input type="radio" name="qnaMode" value="Interactive" id="InteractiveNoQuestion"> Show Q&A </input>
@@ -19,13 +19,13 @@
1919

2020
<div id="questionDiv">
2121
<h8>Q&A input question</h8>
22-
<div class="spacer" />
22+
<div class="spacer"></div>
2323
<input type="text" id="txtQuestion" style="width: 100%" value="2014 total units YTD var % by month, manufacturer as clustered column chart" onchange="UpdateSession(this, SessionKeys.QnaQuestion);"/>
2424
</div>
2525

2626
<div id="embedModeInput">
2727
<div class="noOverflow"><h8>Fill in the fields below to get the code to embed your Q&A.</h8></div>
28-
<div class="spacer" />
28+
<div class="spacer"></div>
2929

3030
<div class="inputLine">
3131
<div class="inputLineTitle">Embed Token</div>

demo/v2-demo/settings_embed_report.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</div>
4343

4444
<div class="noOverflow"><h8>Fill in the fields below to get the code to embed your report</h8></div>
45-
<div class="spacer" />
45+
<div class="spacer"></div>
4646
<div id="embedModeInput">
4747
<div class="inputLine">
4848
<div class="inputLineTitle">Embed Token</div>

demo/v2-demo/settings_embed_tile.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<span class="checkmark"></span></div>
1313
</label>
1414
</div>
15-
<div class="spacer" />
15+
<div class="spacer"></div>
1616
<div id="embedModeInput">
1717
<h8>Fill in the fields below to get the code to embed your tile.</h8>
18-
<div class="spacer" />
18+
<div class="spacer"></div>
1919

2020
<div class="inputLine">
2121
<div class="inputLineTitle">Embed Token</div>

demo/v2-demo/settings_embed_visual.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
</label>
1414
</div>
1515

16-
<div class="spacer" />
16+
<div class="spacer"></div>
1717
<h8>Fill in the fields below to get the code to embed your visual</h8>
18-
<div class="spacer" />
18+
<div class="spacer"></div>
1919
<div id="embedModeInput">
2020
<div class="inputLine">
2121
<div class="inputLineTitle">Embed Token</div>

0 commit comments

Comments
 (0)