Skip to content

Commit

Permalink
Escape single quotes in .info.ym file generation for generate:module …
Browse files Browse the repository at this point in the history
…cmd (#3972)
  • Loading branch information
NickDickinsonWilde authored and LOBsTerr committed Apr 5, 2019
1 parent eeba535 commit 754b55f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Generator/ModuleGenerator.php
Expand Up @@ -61,6 +61,11 @@ public function generate(array $parameters)

$parameters['type'] = 'module';

// Escape single quotes in long parameter strings.
foreach(['description', 'module'] as $param) {
$parameters[$param] = str_replace("'", "''", $parameters[$param]);
}

$this->renderFile(
'module/info.yml.twig',
$moduleDirectory . '/' . $machineName . '.info.yml',
Expand Down

0 comments on commit 754b55f

Please sign in to comment.