FAQ
#19136: String literals in i18n JavaScript code is unescaped breaking
--------------------------------------+------------------------------------
Reporter: jezdez | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: 1.4
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by jezdez):

The code I mean can be found here:
https://github.com/django/django/blob/9d2e1f065ede189f65e79eb3cb33a33b460a4351/django/views/i18n.py#L101-115

`\x04` is the magic delimiter in gettext to make contexts work, so this
needs to be escaped properly.

--
Ticket URL: <https://code.djangoproject.com/ticket/19136#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Django at Oct 17, 2012 at 11:44 am
    #19136: String literals in i18n JavaScript code is unescaped breaking
    ------------------------------------------------+------------------------
    Reporter: jezdez | Owner: nobody
    Type: Bug | Status: new
    Component: Internationalization | Version: 1.4
    Severity: Release blocker | Keywords:
    Triage Stage: Accepted | Has patch: 0
    Needs documentation: 0 | Needs tests: 0
    Patch needs improvement: 0 | Easy pickings: 0
    UI/UX: 0 |
    ------------------------------------------------+------------------------
    The footer JavaScript functions pgettext and npgettext contain unescaped
    string literals that lead to broken code that doesn't actually enable the
    functions to work correctly.

    --
    Ticket URL: <https://code.djangoproject.com/ticket/19136>
    Django <https://code.djangoproject.com/>
    The Web framework for perfectionists with deadlines.

    --
    You received this message because you are subscribed to the Google Groups "Django updates" group.
    To post to this group, send email to django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Oct 17, 2012 at 5:56 pm
    #19136: String literals in i18n JavaScript code is unescaped breaking
    --------------------------------------+------------------------------------
    Reporter: jezdez | Owner: nobody
    Type: Bug | Status: new
    Component: Internationalization | Version: 1.4
    Severity: Release blocker | Resolution:
    Keywords: | Triage Stage: Accepted
    Has patch: 0 | Needs documentation: 0
    Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    --------------------------------------+------------------------------------

    Comment (by claudep):

    See the attached tests, it seems to work, at least in Firefox. Now it may
    be that the unescaped delimiter is causing issues, further investigations
    needed.

    --
    Ticket URL: <https://code.djangoproject.com/ticket/19136#comment:2>
    Django <https://code.djangoproject.com/>
    The Web framework for perfectionists with deadlines.

    --
    You received this message because you are subscribed to the Google Groups "Django updates" group.
    To post to this group, send email to django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Nov 3, 2012 at 1:31 pm
    #19136: String literals in i18n JavaScript code is unescaped breaking
    --------------------------------------+------------------------------------
    Reporter: jezdez | Owner: nobody
    Type: Bug | Status: new
    Component: Internationalization | Version: 1.4
    Severity: Release blocker | Resolution:
    Keywords: | Triage Stage: Accepted
    Has patch: 0 | Needs documentation: 0
    Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    --------------------------------------+------------------------------------

    Comment (by aaugustin):

    Reading Jannis' report, I understand that `\x04` must be escaped in the
    arguments of the `pgettext` and `npgettext` functions before building
    `value`.

    --
    Ticket URL: <https://code.djangoproject.com/ticket/19136#comment:3>
    Django <https://code.djangoproject.com/>
    The Web framework for perfectionists with deadlines.

    --
    You received this message because you are subscribed to the Google Groups "Django updates" group.
    To post to this group, send email to django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Nov 11, 2012 at 12:08 pm
    #19136: String literals in i18n JavaScript code is unescaped breaking
    --------------------------------------+------------------------------------
    Reporter: jezdez | Owner: nobody
    Type: Bug | Status: new
    Component: Internationalization | Version: 1.4
    Severity: Release blocker | Resolution:
    Keywords: | Triage Stage: Accepted
    Has patch: 0 | Needs documentation: 0
    Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    --------------------------------------+------------------------------------

    Comment (by jezdez):

    Yup.

    --
    Ticket URL: <https://code.djangoproject.com/ticket/19136#comment:4>
    Django <https://code.djangoproject.com/>
    The Web framework for perfectionists with deadlines.

    --
    You received this message because you are subscribed to the Google Groups "Django updates" group.
    To post to this group, send email to django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Nov 11, 2012 at 12:23 pm
    #19136: String literals in i18n JavaScript code is unescaped breaking
    -------------------------------------+-------------------------------------
    Reporter: jezdez | Owner: aaugustin
    Type: Bug | Status: new
    Component: | Version: 1.4
    Internationalization | Resolution:
    Severity: Release blocker | Triage Stage: Accepted
    Keywords: | Needs documentation: 0
    Has patch: 0 | Patch needs improvement: 0
    Needs tests: 0 | UI/UX: 0
    Easy pickings: 0 |
    -------------------------------------+-------------------------------------
    Changes (by aaugustin):

    * owner: nobody => aaugustin


    --
    Ticket URL: <https://code.djangoproject.com/ticket/19136#comment:5>
    Django <https://code.djangoproject.com/>
    The Web framework for perfectionists with deadlines.

    --
    You received this message because you are subscribed to the Google Groups "Django updates" group.
    To post to this group, send email to django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Nov 17, 2012 at 12:03 pm
    #19136: String literals in i18n JavaScript code is unescaped breaking
    --------------------------------------+------------------------------------
    Reporter: jezdez | Owner: jezdez
    Type: Bug | Status: new
    Component: Internationalization | Version: 1.4
    Severity: Release blocker | Resolution:
    Keywords: | Triage Stage: Accepted
    Has patch: 0 | Needs documentation: 0
    Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    --------------------------------------+------------------------------------
    Changes (by jezdez):

    * owner: aaugustin => jezdez


    --
    Ticket URL: <https://code.djangoproject.com/ticket/19136#comment:6>
    Django <https://code.djangoproject.com/>
    The Web framework for perfectionists with deadlines.

    --
    You received this message because you are subscribed to the Google Groups "Django updates" group.
    To post to this group, send email to django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Nov 17, 2012 at 2:44 pm
    #19136: String literals in i18n JavaScript code is unescaped breaking
    --------------------------------------+------------------------------------
    Reporter: jezdez | Owner: jezdez
    Type: Bug | Status: closed
    Component: Internationalization | Version: 1.4
    Severity: Release blocker | Resolution: fixed
    Keywords: | Triage Stage: Accepted
    Has patch: 0 | Needs documentation: 0
    Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    --------------------------------------+------------------------------------
    Changes (by Jannis Leidel <jannis@…>):

    * status: new => closed
    * resolution: => fixed


    Comment:

    In [changeset:"4a5e8087ac7676ef08e76275c1f756778b39c13e"]:
    {{{
    #!CommitTicketReference repository=""
    revision="4a5e8087ac7676ef08e76275c1f756778b39c13e"
    Fixed #19136 -- Properly escape gettext context prefixes in the i18n
    JavaScript view template.
    }}}

    --
    Ticket URL: <https://code.djangoproject.com/ticket/19136#comment:7>
    Django <https://code.djangoproject.com/>
    The Web framework for perfectionists with deadlines.

    --
    You received this message because you are subscribed to the Google Groups "Django updates" group.
    To post to this group, send email to django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Nov 17, 2012 at 2:45 pm
    #19136: String literals in i18n JavaScript code is unescaped breaking
    --------------------------------------+------------------------------------
    Reporter: jezdez | Owner: jezdez
    Type: Bug | Status: closed
    Component: Internationalization | Version: 1.4
    Severity: Release blocker | Resolution: fixed
    Keywords: | Triage Stage: Accepted
    Has patch: 0 | Needs documentation: 0
    Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    --------------------------------------+------------------------------------

    Comment (by Jannis Leidel <jannis@…>):

    In [changeset:"0e3f7814d7106768e8eafcba0e74238fcdb90f9d"]:
    {{{
    #!CommitTicketReference repository=""
    revision="0e3f7814d7106768e8eafcba0e74238fcdb90f9d"
    [1.5.x] Fixed #19136 -- Properly escape gettext context prefixes in the
    i18n JavaScript view template.

    Backport of 4a5e8087ac7676ef08e76275c1f756778b39c13e from master.
    }}}

    --
    Ticket URL: <https://code.djangoproject.com/ticket/19136#comment:8>
    Django <https://code.djangoproject.com/>
    The Web framework for perfectionists with deadlines.

    --
    You received this message because you are subscribed to the Google Groups "Django updates" group.
    To post to this group, send email to django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdjango-updates @
categoriesdjango, python
postedOct 17, '12 at 10:51a
activeNov 17, '12 at 2:45p
posts9
users1
websitedjangoproject.com

1 user in discussion

Django: 9 posts

People

Translate

site design / logo © 2018 Grokbase