From f688e4cfa0ad90a0399bcff94e360d078ad0a9a5 Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Sat, 5 Mar 2011 12:51:21 +0100 Subject: [PATCH] refactored toEntryUnformatted:\n * changed from echo to return\n * bulletproof HTML content ('<' -> '<') --- bibtexbrowser.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bibtexbrowser.php b/bibtexbrowser.php index d0cea4c..efaa318 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -1292,16 +1292,18 @@ class BibEntry { * URLs are replaced by HTML links. */ function toEntryUnformatted() { - echo '
'; // pre is nice when it is embedded with no CSS available
-    $entry = $this->getFullText();
+    $result = "";
+    $result .= '
'; // pre is nice when it is embedded with no CSS available
+    $entry = str_replace('<','<',$this->getFullText());
     if ($this->hasField('url')) {
       $url = $this->getField('url');
       // this is not a parsing but a simple replacement
       $entry = str_replace($url,''.$url.'', $entry);
     }
 
-    echo $entry;
-    echo '
'; + $result .= $entry; + $result .= '
'; + return $result; } /**