Skip to content

Commit

Permalink
Merge pull request #68 from Crizz0/issue/67
Browse files Browse the repository at this point in the history
Fix handling of html-tags in ToU and PP
  • Loading branch information
DavidIQ authored Nov 10, 2020
2 parents ccb1aa5 + 75d8bde commit f4c5e09
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Phpbb/TranslationValidator/Validator/LangKeyValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -606,10 +606,10 @@ public function validateHtml($file, $key, $sourceString, $originString)
'SUPPORT_BODY',
'UPDATE_INSTALLATION_EXPLAIN',
'OVERVIEW_BODY',
)) || $this->originLanguagePath . 'ucp.php' === $file && in_array($key, array(
)) || ($this->phpbbVersion == '3.2' && ($this->originLanguagePath . 'ucp.php' === $file && in_array($key, array( //Check for 3.2
'TERMS_OF_USE_CONTENT',
'PRIVACY_POLICY',
)))
)))))
{
$sourceString = '<p>' . $sourceString . '</p>';
$originString = '<p>' . $originString . '</p>';
Expand Down Expand Up @@ -716,6 +716,11 @@ public function validateHtml($file, $key, $sourceString, $originString)
}
}

if ($this->originLanguagePath . 'ucp.php' === $file && in_array($key, array('TERMS_OF_USE_CONTENT', 'PRIVACY_POLICY')) && ($this->phpbbVersion != '3.2'))
{
$level = Output::ERROR;
}

$this->output->addMessage($level, 'String is using additional html: ' . $possibleHtml, $file, $key);
}
}
Expand Down

0 comments on commit f4c5e09

Please sign in to comment.