Ticket #386 (new defect)
Add test to validate all l10n source messages with HTML Purifier
| Reported by: | andy_st | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 3.1 |
| Version: | 3.0 Beta 1 | Keywords: | l10n,qa |
| Cc: |
Description
The l10n server rejects message submissions if the source message doesn't pass certain validation steps.
E.g. $key === generate_key($purified_source_message)
and $message === purify($message)
The output of purify() is slightly different e.g. if the message contains malformed HTML.
Right now, we catch such issues really late. After a release, when users start submitting translations.
And users will pick up a fix only by upgrading their source code (next G3 release).
---
Fix:
Add a ("unit") test that uses the l10n_scanner and checks for each message that is found that:
HTMLPurifier::purify($message) === $message
(We'll need to package HTML purifier with the modules/gallery/test/.)