Skip to content

Commit

Permalink
Merge pull request #2 from ralf1070/master
Browse files Browse the repository at this point in the history
Allow to enter special characters as html entities
  • Loading branch information
tscherter committed Jan 23, 2021
2 parents 80f665f + b099bbf commit f4c8e75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ebnf.php
Expand Up @@ -129,7 +129,7 @@ function arrow($image, $x, $y, $lefttoright) {
function render_node($node, $lefttoright) {
global $white, $black, $blue, $red, $green, $silver;
if ($node->nodeName=='identifier' || $node->nodeName=='terminal') {
$text = $node->getAttribute('value');
$text = html_entity_decode($node->getAttribute('value'));
$w = imagefontwidth(FONT)*(strlen($text)) + 4*UNIT;
$h = 2*UNIT;
$im = create_image($w, $h);
Expand Down Expand Up @@ -379,4 +379,4 @@ function ebnf_parse_factor(&$dom, &$tokens, &$i) {
throw new Exception("Factor expected: {$token['pos']}");
}

?>
?>

0 comments on commit f4c8e75

Please sign in to comment.