Skip to content

Commit 95f64a9

Browse files
authored
Revert "Fix bug when writing ampersand characters (#72)"
This reverts commit 86bd626.
1 parent 86bd626 commit 95f64a9

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/FontProcessor.php

-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public function boxSize(string $text, FontInterface $font): SizeInterface
4848
*/
4949
public function textToVipsImage(string $text, FontInterface $font, ?ColorInterface $color = null): VipsImage
5050
{
51-
// VipsImage::text() can only handle certain characters as HTML entities
52-
$text = htmlentities($text);
53-
5451
if (!is_null($color)) {
5552
$text = '<span foreground="' . $color->toHex('#') . '">' . $text . '</span>';
5653
}

tests/Unit/Modifiers/TextModifierTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public function testApply(): void
2020
$font->setWrapWidth(300);
2121
$font->setAlignment('center');
2222
$font->setLineHeight(2);
23-
$image->modify(new TextModifier('ABC & D', new Point(150, 150), $font));
23+
$image->modify(new TextModifier('ABC', new Point(150, 150), $font));
2424
}
2525
}

0 commit comments

Comments
 (0)