Skip to content

Commit cdf1461

Browse files
committed
Enable HTML validation in CI
Fix invalid or outdated HTML
1 parent c4257c4 commit cdf1461

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+292
-225
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build, Validate, Package & Publish
22

33
on: [push, pull_request, workflow_dispatch]
44

@@ -82,3 +82,20 @@ jobs:
8282
foreach ($file in (Get-ChildItem ${{ env.NuGetDirectory }} -Recurse -Include *.*nupkg)) {
8383
dotnet nuget push $file --skip-duplicate --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
8484
}
85+
86+
validate:
87+
name: Validate HTML and CSS
88+
runs-on: ubuntu-24.04
89+
steps:
90+
- name: Checkout HTML Renderer
91+
uses: actions/checkout@v6
92+
93+
- name: Validate HTML
94+
uses: anishathalye/proof-html@v2
95+
with:
96+
directory: ./Source
97+
check_html: true
98+
check_css: true
99+
check_favicon: false
100+
check_opengraph: false
101+
validator_ignore: '.*Use CSS instead.*|.*An “img” element must have an “alt” attribute.*|.*abcdef-data.*|.*“&” did not start a character reference.*'

Source/Demo/Common/PerfSamples/1.Big table.htm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
1+
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title></title>
4+
<title>Big table</title>
55
<style type="text/css">
66
* {
77
margin: 0;
@@ -3082,6 +3082,5 @@ <h2 style="color: #666666; margin: 0 0 0 0; font-weight: normal; font-size: 24px
30823082
</tr>
30833083
</tbody>
30843084
</table>
3085-
</div>
30863085
</body>
30873086
</html>

Source/Demo/Common/Samples/00.Intro.htm

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!DOCTYPE html>
12
<html>
23
<head>
34
<title>Intro</title>
@@ -6,7 +7,7 @@
67
<body style="background-color: #333; background-gradient: #707; background-gradient-angle: 60; margin: 0;">
78
<h1 align="center" style="color: white">
89
HTML Renderer Project - $$Platform$$
9-
<br />
10+
<br>
1011
<span style="font-size: x-small;">Release $$Release$$</span>
1112
</h1>
1213
<blockquote class="whitehole">
@@ -18,9 +19,9 @@ <h1 align="center" style="color: white">
1819
</td>
1920
<td>
2021
Everything you see on this panel (see samples on the left) is <b>custom-painted</b>
21-
by the <b>HTML Renderer</b>, including tables, images, links and videos.<br />
22+
by the <b>HTML Renderer</b>, including tables, images, links and videos.<br>
2223
This project allows you to have the rich format power of HTML on your desktop applications
23-
without <b>WebBrowser</b> control or <b>MSHTML</b>.<br />
24+
without <b>WebBrowser</b> control or <b>MSHTML</b>.<br>
2425
The library is <b>100% managed code</b> without any external dependencies, the only
2526
requirement is <b>.NET Framework 4.6.2 or higher</b>, including support for Client Profile.
2627
</td>
@@ -33,7 +34,7 @@ <h3>
3334
<div>
3435
The rendered html has full support for <b>text selection</b> including <b>drag-and-drop</b>
3536
and <b>copy</b> to clipboard of rich html and plain text to handle <b>paste</b>
36-
operation to editor that support rich or/and plain text.<br />
37+
operation to editor that support rich or/and plain text.<br>
3738
Additionally there is a <b>context-menu</b> with select all, copy text, copy image,
3839
save image, open link, copy link url, open video, copy video url.
3940
</div>
@@ -42,7 +43,7 @@ <h3>
4243
</h3>
4344
<div>
4445
The core layout engine of the renderer was builded according to <b>CSS Level 2 specification</b>,
45-
so you can use Cascading Style Sheets to format your html documents.<br />
46+
so you can use Cascading Style Sheets to format your html documents.<br>
4647
Additionally there are a couple extensions: <b>Gradients</b> on backgrounds and
4748
<b>rounded corners</b>.
4849
</div>

Source/Demo/Common/Samples/01.History.htm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
<!DOCTYPE html>
12
<html>
23
<head>
3-
<link rel="Stylesheet" href="StyleSheet" />
4+
<title>History</title>
5+
<link rel="Stylesheet" href="StyleSheet">
46
</head>
57
<body>
68
<h1>

Source/Demo/Common/Samples/02.Text.htm

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
<html>
1+
<!DOCTYPE html>
2+
<html>
23
<head>
34
<title>Text</title>
4-
<link rel="Stylesheet" href="StyleSheet" />
5+
<link rel="Stylesheet" href="StyleSheet">
56
<style type="text/css">
67
::selection {
78
color: #bb5555;
@@ -100,7 +101,7 @@ <h2>Preformatted text</h2>
100101
<span style="color: #099">MessageBox</span>.Show(<span color="maroon">"Hello World"</span>);
101102
}
102103
}</pre>
103-
<br />
104+
<br>
104105
<hr />
105106
<h2>Lists</h2>
106107
<p>
@@ -116,10 +117,12 @@ <h3>Unordered list
116117
<ul>
117118
<li>Sub item one</li>
118119
<li>Sub item two</li>
119-
<ul>
120-
<li>Sub-sub item two</li>
121-
<li>Sub-sub item two</li>
122-
</ul>
120+
<li>
121+
<ul>
122+
<li>Sub-sub item two</li>
123+
<li>Sub-sub item two</li>
124+
</ul>
125+
</li>
123126
</ul>
124127
</li>
125128
<li>Item three</li>
@@ -146,7 +149,7 @@ <h3>List nesting</h3>
146149
<li>Item four</li>
147150
<li>Item five</li>
148151
</ol>
149-
<br />
152+
<br>
150153
<hr />
151154
<h2>Right to left direction
152155
</h2>

Source/Demo/Common/Samples/03.Tables.htm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!DOCTYPE html>
12
<html>
23
<head>
34
<title>Tables</title>
@@ -60,7 +61,7 @@ <h2>
6061
</td>
6162
</tr>
6263
</table>
63-
<br />
64+
<br>
6465
<div class="caption">
6566
Table with complex text and width=100%
6667
</div>
@@ -114,7 +115,7 @@ <h2>
114115
</td>
115116
</tr>
116117
</table>
117-
<br />
118+
<br>
118119
<div class="caption">
119120
Table with colspans:</div>
120121
<table>
@@ -146,7 +147,7 @@ <h2>
146147
</td>
147148
</tr>
148149
</table>
149-
<br />
150+
<br>
150151
<div class="caption">
151152
Table with rowspans:</div>
152153
<table>

Source/Demo/Common/Samples/04.Links.htm

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
<!DOCTYPE html>
12
<html>
23
<head>
34
<title>Links</title>
4-
<link rel="Stylesheet" href="StyleSheet" />
5+
<link rel="Stylesheet" href="StyleSheet">
56
</head>
67
<body>
78
<h1>Links
@@ -13,21 +14,21 @@ <h1>Links
1314
<p>
1415
<h3>URI href</h3>
1516
Any valid URI path will activate the default internet browser.
16-
<br />
17+
<br>
1718
Check the context menu options on the link as well by right clicking on it.
18-
<br />
19+
<br>
1920
This is a URI link to <a href="https://codeplexarchive.org/project/HtmlRenderer">HTML Renderer</a> (<code>href="https://codeplexarchive.org/project/HtmlRenderer"</code>)
2021
</p>
2122
<p>
2223
<h3>File path href</h3>
2324
Any file system path, It will be started as if you typed it on the <i>Run</i> Windows dialog.
24-
<br />
25-
This is a link to <a href="C:\">hard drive</a> <code>(href="C:\")</code>
25+
<br>
26+
This is a link to <a href="C:/">hard drive</a> <code>(href="C:/")</code>
2627
</p>
2728
<p>
2829
<h3>Anchors href</h3>
2930
Link to elements on the page using element id will scroll to that element so it will be at the top.
30-
<br />
31+
<br>
3132
This is a link to <a href="#anchor">anchor</a> at the bottom of the page <code>(href="#anchor")</code>
3233
</p>
3334
<p>

Source/Demo/Common/Samples/05.Images.htm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
<!DOCTYPE html>
12
<html>
23
<head>
3-
<title></title>
4-
<link rel="Stylesheet" href="StyleSheet" />
4+
<title>Images</title>
5+
<link rel="Stylesheet" href="StyleSheet">
56
<style>
67
.tag { color: rgb(128, 0, 0); }
78

@@ -22,7 +23,7 @@ <h1>Images
2223
<blockquote>
2324
<p>
2425
HTML Renderer supports <code class="tag">img</code> tag as well as CSS <code class="prop">background-image</code> property.
25-
<br />
26+
<br>
2627
Image data can be provided by URI, file path, base64 encoded and code interception.
2728

2829
</p>
@@ -47,7 +48,7 @@ <h2>img tag</h2>
4748
other box.
4849
<div style="margin-top: 10px;">
4950
<b>Limitation</b>
50-
<br />
51+
<br>
5152
Image <code class="att">align</code> attribute and CSS <code class="prop">float</code> property are not yet supported.
5253
</div>
5354
</p>

Source/Demo/Common/Samples/06.Embeded video.htm

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
<!DOCTYPE html>
12
<html>
23
<head>
3-
<link rel="Stylesheet" href="StyleSheet" />
4+
<title>Embeded video</title>
5+
<link rel="Stylesheet" href="StyleSheet">
46
</head>
57
<body>
68
<h1>
79
Embeded video
810
</h1>
911
<blockquote>
1012
<p>
11-
Embeded video is an 'iframe' with 'src' pointing to the video hosted on the server.<br />
13+
Embeded video is an 'iframe' with 'src' pointing to the video hosted on the server.<br>
1214
Obviously the Html Renderer doesn't support iframes so don't expect to see ActiveX
1315
in the control that will stream the video, but the video thumbnail image, caption
1416
string and play visualization is shown. Clicking on it will open the video
@@ -19,9 +21,9 @@ <h3>
1921
</h3>
2022
<div>
2123
The id of the video is extracted from the 'src' URL and using the server API gets
22-
the video data is extracted: thumbnail image url, caption string and link url.<br />
24+
the video data is extracted: thumbnail image url, caption string and link url.<br>
2325
Then, on the video frame location, the thumbnail image is shown with the caption
24-
on top and a nice play button in the middle.<br />
26+
on top and a nice play button in the middle.<br>
2527
When the user clicks on the video frame a link click events occures that opens the
2628
actual video page, instead of video source.
2729
</div>
@@ -33,8 +35,8 @@ <h3>
3335
<h2>
3436
Example
3537
</h2>
36-
<iframe height="360" width="480" src="https://www.youtube.com/embed/2l_PmSOreGc" /><br /><br />
37-
<iframe height="270" width="480" src="https://player.vimeo.com/video/170338499" />
38+
<iframe height="360" width="480" src="https://www.youtube.com/embed/2l_PmSOreGc"></iframe><br><br>
39+
<iframe height="270" width="480" src="https://player.vimeo.com/video/170338499"></iframe>
3840
</blockquote>
3941
</body>
4042
</html>

Source/Demo/Common/Samples/07.Additional features.htm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!DOCTYPE html>
12
<html>
23
<head>
34
<title>Additional features</title>

0 commit comments

Comments
 (0)