From c06c26b90c5a6b722d368a4b32b8e0ba681ef99a Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Thu, 28 Oct 2010 18:06:13 +0200 Subject: [PATCH] better handling of escaped quotes --- bibtexbrowser.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bibtexbrowser.php b/bibtexbrowser.php index cc9590f..a051599 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -563,6 +563,7 @@ for ( $i=0; $i < strlen( $sread ); $i++) { $s=$sread[$i]; // handle anti-double quotes else if ($state==GETVALUEDELIMITEDBYQUOTES_ESCAPED) { $state = GETVALUEDELIMITEDBYQUOTES; + $inentryvaluedelimitedB = substr($inentryvaluedelimitedB,0,strlen($inentryvaluedelimitedB)-1); $inentryvaluedelimitedB=$inentryvaluedelimitedB.$s; } @@ -2068,8 +2069,8 @@ class BibDataBase { if (!$bib->hasField("keywords")) continue; $tags =preg_split('/[,;]/', $bib->getField("keywords")); foreach($tags as $a){ - $ta = trim($a); - $result[$ta] = $ta; + $ta = trim($a); + $result[$ta] = $ta; } } asort($result);