pengzhibo168 5 年之前
父節點
當前提交
aee35195df
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      controller/LangArea.py

+ 2 - 1
controller/LangArea.py

@@ -172,7 +172,8 @@ class LangAreaView(TemplateView):
                 lk = lk.replace('‘', '_')
                 # 正则表达式
                 # re.sub("[a-z]+", "$", "123abc78ab9cdeg00t8")
-                content_val = res[l].replace("'","\\'")
+                #安卓的把“转为\"
+                content_val = res[l].replace('"', '\\"')
                 content = content + '<string name="' + lk + '">' + content_val + '</string>\n'
         response = StreamingHttpResponse(content)
         response['Content-Type'] = 'application/octet-stream'