Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

109
Views
Flask Babelex 0.9.4 and % escaping

In a Flask application we recently upgraded Werkzeug to 1.0.1 (so we could set the same site on cookies), which forced a few dependencies, among which Flask-BabelEx==0.9.4.

After this upgrade, the handling of escaped % (percent signs) changed in a very troubling way. Where gettext('foo %%') used to return *"foo %"*, it now returns *"foo %%"*, in other words, the escaping of % sign seems to not be handled. I thought, ok, a little upward incompatibility, we just have to replace all the %% by % in babel strings (in reference language as well as in all translations, so that's a big deal already).

But that's not the end of the story, because for all babel strings used within Jinja2 templates, such as {{ _("This is a percent sign: %") }}, the escaping of % signs is still handled, so this still needs to be {{ _("This is a percent sign: %%") }}. So do we have to handle both %-escaped and unescaped babel strings depending on where they are used? Is there a setting somewhere that would alleviate this escaping issue.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!