Welcome, Guest! Log In | Create Account

Ticket #386 (new defect)

Opened 7 months ago

Last modified 4 months ago

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/.)

Change History

Changed 4 months ago by andy_st

  • milestone changed from 3.0.1 to 3.1
Note: See TracTickets for help on using tickets.