This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """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. |