Skip to content

Commit f4c5e09

Browse files
authored
Merge pull request #68 from Crizz0/issue/67
Fix handling of html-tags in ToU and PP
2 parents ccb1aa5 + 75d8bde commit f4c5e09

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/Phpbb/TranslationValidator/Validator/LangKeyValidator.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,10 +606,10 @@ public function validateHtml($file, $key, $sourceString, $originString)
606606
'SUPPORT_BODY',
607607
'UPDATE_INSTALLATION_EXPLAIN',
608608
'OVERVIEW_BODY',
609-
)) || $this->originLanguagePath . 'ucp.php' === $file && in_array($key, array(
609+
)) || ($this->phpbbVersion == '3.2' && ($this->originLanguagePath . 'ucp.php' === $file && in_array($key, array( //Check for 3.2
610610
'TERMS_OF_USE_CONTENT',
611611
'PRIVACY_POLICY',
612-
)))
612+
)))))
613613
{
614614
$sourceString = '<p>' . $sourceString . '</p>';
615615
$originString = '<p>' . $originString . '</p>';
@@ -716,6 +716,11 @@ public function validateHtml($file, $key, $sourceString, $originString)
716716
}
717717
}
718718

719+
if ($this->originLanguagePath . 'ucp.php' === $file && in_array($key, array('TERMS_OF_USE_CONTENT', 'PRIVACY_POLICY')) && ($this->phpbbVersion != '3.2'))
720+
{
721+
$level = Output::ERROR;
722+
}
723+
719724
$this->output->addMessage($level, 'String is using additional html: ' . $possibleHtml, $file, $key);
720725
}
721726
}

0 commit comments

Comments
 (0)