Skip to content

Commit

Permalink
Paranoid escaping in CatalogueCompiler
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed Aug 3, 2014
1 parent dc22a83 commit 58b0924
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kdyby/Translation/CatalogueCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected function compilePhpCache(Translator $translator, array &$availableCata
$fallbackContent = '';
$current = new Code\PhpLiteral('');
foreach ($this->fallbackResolver->compute($translator, $locale) as $fallback) {
$fallbackSuffix = new Code\PhpLiteral(ucfirst(str_replace('-', '_', $fallback)));
$fallbackSuffix = new Code\PhpLiteral(ucfirst(str_replace('-', '_', Nette\Utils\Strings::webalize($fallback, NULL, FALSE))));

$fallbackContent .= Code\Helpers::format(<<<EOF
\$catalogue? = new MessageCatalogue(?, ?);
Expand Down

0 comments on commit 58b0924

Please sign in to comment.