diff models/extractapp.php @ 76:c49192885290 extractapp

Bug fixed: ambiguous tag occured at Editing-text mode
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 13 Apr 2015 15:43:59 +0200
parents 75233b09c580
children 97c1e5102a22
line wrap: on
line diff
--- a/models/extractapp.php	Thu Apr 09 15:29:46 2015 +0200
+++ b/models/extractapp.php	Mon Apr 13 15:43:59 2015 +0200
@@ -378,11 +378,15 @@
             $require = preg_replace("/<br>/u", "\n", $require);
             //$require = preg_replace("/<br>/u", "\n", $require);
 
-
+            $require = "<text_content>".$require."</text_content>\n";
+            
+            /*
             if ($_postdata['branchId'] == 0) {
                 // -- new branch case
                 $require = "<text_content>".$require."</text_content>\n";
             }
+            */
+
             $require = $this->AppendMetaData($require);
                 
             //saving in my local machine in developing phrase
@@ -1163,7 +1167,10 @@
 
         $contentString = (string)($xml->text_content->asXML());
 
-        return $contentString;
+        $removed_str = array("<text_content>","</text_content>");
+        $new_contentString = str_replace($removed_str, "", $contentString);
+
+        return $new_contentString;
     }