Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion #7295: quotes, escaping and translation of string literals in templates
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
akaihola  
View profile  
 More options May 23 2008, 10:56 am
From: akaihola <akaih...@gmail.com>
Date: Fri, 23 May 2008 07:56:25 -0700 (PDT)
Local: Fri, May 23 2008 10:56 am
Subject: Re: #7295: quotes, escaping and translation of string literals in templates
It's confusing that the django.utils.text.smart_split() function un-
escapes quotes and backslashes inside the literal string while
preserving the surrounding quotes:

    >>> print '  '.join(smart_split(ur'arg1 "the \"second\" argument"
"the \\third\\ argument"'))
    arg1  "the "second" argument"  "the \third\ argument"

I would find it simpler to just have either
1) escaped and quoted literal strings, or
2) un-escaped and un-quoted strings.

This would also make it simpler to unify the handling of variables and
filter expressions in django/template/__init__.py.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google