Skip to content

Commit

Permalink
Merge pull request #217 from linawolf/lwolf-fix-tables
Browse files Browse the repository at this point in the history
[BUGFIX] Fix UTf-8 encoding in tables
  • Loading branch information
greg0ire authored Dec 29, 2022
2 parents 9142491 + b3e0fe5 commit 0b1d413
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Nodes/Table/TableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function getRowSpan(): int

public function addContent(string $content): void
{
$this->content = trim($this->content . utf8_encode($content));
$this->content = trim($this->content . $content);
}

public function incrementRowSpan(): void
Expand Down
18 changes: 18 additions & 0 deletions tests/Functional/tests/render/table-grid-utf8/table-grid-utf8.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<table>
<thead>
<tr>
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr>
<td>x</td>
<td>
é à
<br />
é
</td>
</tr>
</tbody>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
+---+-------+
| A | B |
+===+=======+
| x | é à \ |
| | é |
+---+-------+

0 comments on commit 0b1d413

Please sign in to comment.