fix xslt conversion (show all translation)
[mdictionary] / trunk / src / plugins / xdxf / src / xdxfplugin.cpp
index b4fdb5a..b734e26 100644 (file)
@@ -210,6 +210,7 @@ QString XdxfPlugin::searchFile(QString key) {
     QXmlStreamReader reader(&dictionaryFile);
 
 
+
     QString a;
 
     bool match =false;
@@ -236,7 +237,7 @@ QString XdxfPlugin::searchFile(QString key) {
                        temp= temp + tr(" c=\"") + reader.attributes().value(tr("c")).toString() + tr("\"");
                     temp+=tr(">");
                 }
-                temp+= reader.text().toString();
+                temp+= reader.text().toString().replace("<","&lt;").replace(">","&gt;");
                 reader.readNext();
             }
             if(temp.at(0)==QChar('\n'))
@@ -480,7 +481,7 @@ bool XdxfPlugin::makeCache(QString dir) {
                        temp= temp + tr(" c=\"") + reader.attributes().value(tr("c")).toString() + tr("\"");
                     temp+=tr(">");
                 }
-                temp+= reader.text().toString();
+                temp+= reader.text().toString().replace("<","&lt;").replace(">","&gt;");;
                 reader.readNext();
             }
             if(temp.at(0)==QChar('\n'))