[xiph-commits] r8826 - trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Thu Feb 3 02:47:48 PST 2005


Author: illiminable
Date: 2005-02-03 02:47:37 -0800 (Thu, 03 Feb 2005)
New Revision: 8826

Modified:
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_AnchorTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_DescTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_HeadTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_TitleTag.cpp
Log:
* Really escape xml entities

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_AnchorTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_AnchorTag.cpp	2005-02-03 10:38:51 UTC (rev 8825)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_AnchorTag.cpp	2005-02-03 10:47:37 UTC (rev 8826)
@@ -86,7 +86,7 @@
 	retStr += makeRequiredAttribute(L"href", mHref);
 
 	retStr += L">";
-	retStr += mText;
+	retStr += escapeEntities(mText);
 	retStr += L"</a>\n";
 	
 	return retStr;

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLTag.cpp	2005-02-03 10:38:51 UTC (rev 8825)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLTag.cpp	2005-02-03 10:47:37 UTC (rev 8826)
@@ -56,7 +56,7 @@
 wstring C_CMMLTag::makeAttribute(wstring inElemName, wstring inElemContent) {
 	if (inElemContent != L"") {
 		wstring retStr;
-		retStr = L" " + inElemName + L"=\"" + inElemContent + L"\"";
+		retStr = L" " + escapeEntities(inElemName) + L"=\"" + escapeEntities(inElemContent) + L"\"";
 		return retStr;
 	} else {
 		return L"";
@@ -65,7 +65,7 @@
 
 wstring C_CMMLTag::makeRequiredAttribute(wstring inElemName, wstring inElemContent) {
 	wstring retStr;
-	retStr = L" " + inElemName + L"=\"" + inElemContent + L"\"";
+	retStr = L" " + escapeEntities(inElemName) + L"=\"" + escapeEntities(inElemContent) + L"\"";
 	return retStr;
 }
 

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_DescTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_DescTag.cpp	2005-02-03 10:38:51 UTC (rev 8825)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_DescTag.cpp	2005-02-03 10:47:37 UTC (rev 8826)
@@ -55,7 +55,7 @@
 	retStr += makeLangElements();
 
 	retStr += L">";
-	retStr += mText;
+	retStr += escapeEntities(mText);
 	retStr += L"</desc>\n";
 	return retStr;
 }

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_HeadTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_HeadTag.cpp	2005-02-03 10:38:51 UTC (rev 8825)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_HeadTag.cpp	2005-02-03 10:47:37 UTC (rev 8826)
@@ -105,12 +105,12 @@
 
 
 wstring C_HeadTag::toString() {
-	//TO DO::: Optional tags
+	//TODO::: Should use new helper functions !!
 	wstring retStr = L"<head";
 
 	if (mId.size() != 0) {
 		retStr += L" id=\"";
-		retStr += mId;
+		retStr += escapeEntities(mId);
 		retStr += L"\"";
 	}
 
@@ -118,7 +118,7 @@
 
 	if (mProfile.size() != 0) {
 		retStr += L" profile=\"";
-		retStr += mProfile;
+		retStr += escapeEntities(mProfile);
 		retStr += L"\"";
 	}
 	retStr+= L">\n";

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_TitleTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_TitleTag.cpp	2005-02-03 10:38:51 UTC (rev 8825)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_TitleTag.cpp	2005-02-03 10:47:37 UTC (rev 8826)
@@ -53,7 +53,7 @@
 
 	retStr += makeLangElements();
 	retStr += L">";
-	retStr += mText;
+	retStr += escapeEntities(mText);
 	retStr+= L"</title>\n";
 	return retStr;
 }



More information about the commits mailing list