Skip to content

feat: add latex_escape filter for special character handling in LaTeX#66

Merged
OMikkel merged 1 commit intomasterfrom
fix/barmenu-template
Apr 19, 2026
Merged

feat: add latex_escape filter for special character handling in LaTeX#66
OMikkel merged 1 commit intomasterfrom
fix/barmenu-template

Conversation

@OMikkel
Copy link
Copy Markdown
Contributor

@OMikkel OMikkel commented Apr 19, 2026

This pull request introduces LaTeX escaping for menu item fields in the bar menu template to prevent issues with special characters when rendering LaTeX documents. The main change is the addition and use of a custom Django template filter to safely escape LaTeX-sensitive characters in rendered text.

LaTeX escaping improvements:

  • Added a new template filter latex_escape in items/templatetags/latex_escape.py to escape special LaTeX characters in strings.
  • Updated the barmenu.tex template to load the new latex_escape filter and apply it to the item type name, item name, and price fields, ensuring safe LaTeX output. [1] [2]

Template adjustments:

  • Minor formatting adjustment in barmenu.tex for improved code clarity.

@OMikkel OMikkel self-assigned this Apr 19, 2026
@OMikkel OMikkel marked this pull request as ready for review April 19, 2026 17:49
@OMikkel OMikkel merged commit b70ec5b into master Apr 19, 2026
14 checks passed
@OMikkel OMikkel deleted the fix/barmenu-template branch April 19, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant