Skip to content

Commit 4804307

Browse files
committed
  is not HTML5 valid
1 parent c9c4c99 commit 4804307

File tree

3 files changed

+39
-39
lines changed

3 files changed

+39
-39
lines changed

lib/Diff/Renderer/Html/Array.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function fixSpaces($matches)
241241

242242
$div = floor($count / 2);
243243
$mod = $count % 2;
244-
return str_repeat('  ', $div).str_repeat(' ', $mod);
244+
return str_repeat('  ', $div).str_repeat(' ', $mod);
245245
}
246246

247247
/**

lib/Diff/Renderer/Html/Inline.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function render()
7474
$html .= '<tbody class="Skipped">';
7575
$html .= '<th>&hellip;</th>';
7676
$html .= '<th>&hellip;</th>';
77-
$html .= '<td>&nbsp;</td>';
77+
$html .= '<td>&#xA0;</td>';
7878
$html .= '</tbody>';
7979
}
8080

@@ -97,9 +97,9 @@ public function render()
9797
foreach($change['changed']['lines'] as $no => $line) {
9898
$toLine = $change['changed']['offset'] + $no + 1;
9999
$html .= '<tr>';
100-
$html .= '<th>&nbsp;</th>';
100+
$html .= '<th>&#xA0;</th>';
101101
$html .= '<th>'.$toLine.'</th>';
102-
$html .= '<td class="Right"><ins>'.$line.'</ins>&nbsp;</td>';
102+
$html .= '<td class="Right"><ins>'.$line.'</ins>&#xA0;</td>';
103103
$html .= '</tr>';
104104
}
105105
}
@@ -109,8 +109,8 @@ public function render()
109109
$fromLine = $change['base']['offset'] + $no + 1;
110110
$html .= '<tr>';
111111
$html .= '<th>'.$fromLine.'</th>';
112-
$html .= '<th>&nbsp;</th>';
113-
$html .= '<td class="Left"><del>'.$line.'</del>&nbsp;</td>';
112+
$html .= '<th>&#xA0;</th>';
113+
$html .= '<td class="Left"><del>'.$line.'</del>&#xA0;</td>';
114114
$html .= '</tr>';
115115
}
116116
}
@@ -120,15 +120,15 @@ public function render()
120120
$fromLine = $change['base']['offset'] + $no + 1;
121121
$html .= '<tr>';
122122
$html .= '<th>'.$fromLine.'</th>';
123-
$html .= '<th>&nbsp;</th>';
123+
$html .= '<th>&#xA0;</th>';
124124
$html .= '<td class="Left"><span>'.$line.'</span></td>';
125125
$html .= '</tr>';
126126
}
127127

128128
foreach($change['changed']['lines'] as $no => $line) {
129129
$toLine = $change['changed']['offset'] + $no + 1;
130130
$html .= '<tr>';
131-
$html .= '<th>&nbsp;</th>';
131+
$html .= '<th>&#xA0;</th>';
132132
$html .= '<th>'.$toLine.'</th>';
133133
$html .= '<td class="Right"><span>'.$line.'</span></td>';
134134
$html .= '</tr>';

lib/Diff/Renderer/Html/SideBySide.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@
55
* PHP version 5
66
*
77
* Copyright (c) 2009 Chris Boulton <chris.boulton@interspire.com>
8-
*
8+
*
99
* All rights reserved.
10-
*
11-
* Redistribution and use in source and binary forms, with or without
10+
*
11+
* Redistribution and use in source and binary forms, with or without
1212
* modification, are permitted provided that the following conditions are met:
1313
*
1414
* - Redistributions of source code must retain the above copyright notice,
1515
* this list of conditions and the following disclaimer.
1616
* - Redistributions in binary form must reproduce the above copyright notice,
1717
* this list of conditions and the following disclaimer in the documentation
1818
* and/or other materials provided with the distribution.
19-
* - Neither the name of the Chris Boulton nor the names of its contributors
20-
* may be used to endorse or promote products derived from this software
19+
* - Neither the name of the Chris Boulton nor the names of its contributors
20+
* may be used to endorse or promote products derived from this software
2121
* without specific prior written permission.
2222
*
23-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26-
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27-
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28-
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29-
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30-
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31-
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32-
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3333
* POSSIBILITY OF SUCH DAMAGE.
3434
*
3535
* @package DiffLib
@@ -69,8 +69,8 @@ public function render()
6969
foreach($changes as $i => $blocks) {
7070
if($i > 0) {
7171
$html .= '<tbody class="Skipped">';
72-
$html .= '<th>&hellip;</th><td>&nbsp;</td>';
73-
$html .= '<th>&hellip;</th><td>&nbsp;</td>';
72+
$html .= '<th>&hellip;</th><td>&#xA0;</td>';
73+
$html .= '<th>&hellip;</th><td>&#xA0;</td>';
7474
$html .= '</tbody>';
7575
}
7676

@@ -83,9 +83,9 @@ public function render()
8383
$toLine = $change['changed']['offset'] + $no + 1;
8484
$html .= '<tr>';
8585
$html .= '<th>'.$fromLine.'</th>';
86-
$html .= '<td class="Left"><span>'.$line.'</span>&nbsp;</span></td>';
86+
$html .= '<td class="Left"><span>'.$line.'</span>&#xA0;</span></td>';
8787
$html .= '<th>'.$toLine.'</th>';
88-
$html .= '<td class="Right"><span>'.$line.'</span>&nbsp;</span></td>';
88+
$html .= '<td class="Right"><span>'.$line.'</span>&#xA0;</span></td>';
8989
$html .= '</tr>';
9090
}
9191
}
@@ -94,10 +94,10 @@ public function render()
9494
foreach($change['changed']['lines'] as $no => $line) {
9595
$toLine = $change['changed']['offset'] + $no + 1;
9696
$html .= '<tr>';
97-
$html .= '<th>&nbsp;</th>';
98-
$html .= '<td class="Left">&nbsp;</td>';
97+
$html .= '<th>&#xA0;</th>';
98+
$html .= '<td class="Left">&#xA0;</td>';
9999
$html .= '<th>'.$toLine.'</th>';
100-
$html .= '<td class="Right"><ins>'.$line.'</ins>&nbsp;</td>';
100+
$html .= '<td class="Right"><ins>'.$line.'</ins>&#xA0;</td>';
101101
$html .= '</tr>';
102102
}
103103
}
@@ -107,9 +107,9 @@ public function render()
107107
$fromLine = $change['base']['offset'] + $no + 1;
108108
$html .= '<tr>';
109109
$html .= '<th>'.$fromLine.'</th>';
110-
$html .= '<td class="Left"><del>'.$line.'</del>&nbsp;</td>';
111-
$html .= '<th>&nbsp;</th>';
112-
$html .= '<td class="Right">&nbsp;</td>';
110+
$html .= '<td class="Left"><del>'.$line.'</del>&#xA0;</td>';
111+
$html .= '<th>&#xA0;</th>';
112+
$html .= '<td class="Right">&#xA0;</td>';
113113
$html .= '</tr>';
114114
}
115115
}
@@ -120,10 +120,10 @@ public function render()
120120
$fromLine = $change['base']['offset'] + $no + 1;
121121
$html .= '<tr>';
122122
$html .= '<th>'.$fromLine.'</th>';
123-
$html .= '<td class="Left"><span>'.$line.'</span>&nbsp;</td>';
123+
$html .= '<td class="Left"><span>'.$line.'</span>&#xA0;</td>';
124124
if(!isset($change['changed']['lines'][$no])) {
125-
$toLine = '&nbsp;';
126-
$changedLine = '&nbsp;';
125+
$toLine = '&#xA0;';
126+
$changedLine = '&#xA0;';
127127
}
128128
else {
129129
$toLine = $change['base']['offset'] + $no + 1;
@@ -137,16 +137,16 @@ public function render()
137137
else {
138138
foreach($change['changed']['lines'] as $no => $changedLine) {
139139
if(!isset($change['base']['lines'][$no])) {
140-
$fromLine = '&nbsp;';
141-
$line = '&nbsp;';
140+
$fromLine = '&#xA0;';
141+
$line = '&#xA0;';
142142
}
143143
else {
144144
$fromLine = $change['base']['offset'] + $no + 1;
145145
$line = '<span>'.$change['base']['lines'][$no].'</span>';
146146
}
147147
$html .= '<tr>';
148148
$html .= '<th>'.$fromLine.'</th>';
149-
$html .= '<td class="Left"><span>'.$line.'</span>&nbsp;</td>';
149+
$html .= '<td class="Left"><span>'.$line.'</span>&#xA0;</td>';
150150
$toLine = $change['changed']['offset'] + $no + 1;
151151
$html .= '<th>'.$toLine.'</th>';
152152
$html .= '<td class="Right">'.$changedLine.'</td>';

0 commit comments

Comments
 (0)