Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

116
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda