[xiph-cvs] cvs commit: positron/positron/db MDB.py

Stan Seibert volsung at xiph.org
Sat May 24 14:25:44 PDT 2003



volsung     03/05/24 17:25:44

  Modified:    positron/db MDB.py
  Log:
  Escaping special characters in fields should now actually work.  Fixes
  bug #350

Revision  Changes    Path
1.2       +2 -2      positron/positron/db/MDB.py

Index: MDB.py
===================================================================
RCS file: /usr/local/cvsroot/positron/positron/db/MDB.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MDB.py	22 May 2003 04:42:52 -0000	1.1
+++ MDB.py	24 May 2003 21:25:44 -0000	1.2
@@ -68,7 +68,7 @@
 
     for i in range(0, len(str), 2):
         word = str[i:i+2]
-        if new in (Special.FIELD_DELIM, Special.END_OF_RECORD,
+        if word in (Special.FIELD_DELIM, Special.END_OF_RECORD,
                    Special.BAG_DELIM, Special.ESCAPER):
             new += Special.ESCAPER
         new += word
@@ -77,7 +77,7 @@
 
 def _pack_field(field):
     """Packs a field (list of values) with bag delimiters as needed"""
-    str = field[0]
+    str = _escape_string(field[0])
     for item in field[1:]:
         str +=  Special.BAG_DELIM + _escape_string(item)
 

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list