Skip to content

Instantly share code, notes, and snippets.

"""Contains classes and methods to lint poentries.
Poentries are objects that contain strings from our site and their
translations. If a translator makes a mistake (forgets to close a math tag for
instance), or is feeling evil and tries to inject some <script> tags, we want
to catch that and filter it out. The main function in this module is
lint_poentry which will do just that. It also will do some autocorrections if
it can, such as converting numbers to use the right group separator and
decimal symbol.