insert_block() ruins arguments containing HTML
Posted: 12 June 2013, 16:33
I find it great to color player names whenever they are shown. It makes they more readable (as long as they are not dark on a dark background or something...)
But since it adds HTML code to plain text, it's troublesome.
In mygame.view.php, I have this:And guess what, $this->game->coloredPlayerName() returns some HTML which $this->page->insert_block() seems to processes through htmlentities() and screw up.
Now, for the question: how can I make $this->page->insert_block() not put some arguments through htmlentities()? Or even better, how can I easily make this work?
Thanks ^^
But since it adds HTML code to plain text, it's troublesome.
In mygame.view.php, I have this:
Code: Select all
$this->page->insert_block("player_district", Array(
'DISTRICT_OF' => str_replace('$playerName', $this->game->coloredPlayerName($player), self::_('District of $playerName'))
));Now, for the question: how can I make $this->page->insert_block() not put some arguments through htmlentities()? Or even better, how can I easily make this work?
Thanks ^^