diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index 06894e1..bcf7f05 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -1,4 +1,4 @@ -2025-08-22 + /*////////////////////////////////////////////////////////////////////////////////////// diff --git a/ZCppMain/ZMainXhtml.H b/ZCppMain/ZMainXhtml.H index 6f8828e..e4b6ccf 100644 --- a/ZCppMain/ZMainXhtml.H +++ b/ZCppMain/ZMainXhtml.H @@ -7,29 +7,36 @@ namespace ZNsMain { - template TStringData& ZftConvertXhtml(TStringData& ARR_CString) + template TStringData& ZftConvertXhtml(TStringData& ARRoCString) { - /* 데이타를 그대로 클라이언트에 전송하면 - HTML 태그와 혼동될 수 있는데 이를 방지하기 위해 - 적절히 인코딩한다. + /* 데이타를 그대로 클라이언트에 전송하면, HTML 태그와 + 혼동될 수 있는데, 이를 방지하기 위해 적절히 인코딩한다. */ - return ARR_CString. - Replace("&" ,"&" ). Replace("<" ,"<" ). - Replace(">" ,">" ). Replace(" " ," " ). - Replace("\n","
" ); + return ARRoCString. + Replace("&" ,"&" ). Replace("<" ,"<" ). + Replace(">" ,">" ). Replace(" " ," "). + Replace("\n","
" ); }/* - template static TStringData& ConvertXhtml(TStringData& ARR_CString) */ + template TStringData& ConvertXhtml(TStringData& ARRoCString) */ - template TStringData& ZftConvertXhtmlAtt(TStringData& ARR_CString) + + template TStringData& ZftMakeXmlAttEnc(TStringData& ARRoCStringData) { - // X(H)TML 의 속성에 올 수 있는 값으로 인코딩한다. - - return ARR_CString. - Replace("&" ,"&" ). Replace("<" ,"<" ). - Replace(">" ,">" ). Replace("\"",""" ). - Replace("\r"," " ). Replace("\n"," " ); + return ARRoCStringData. + Replace("&" , "&" ).Replace("\r", " " ). + Replace("\n", " " ).Replace("\t", " " ). + Replace("\"", """).Replace(">" , ">" ).Replace("<", "<"); }/* - template TStringData& ZftConvertXhtmlAtt(TStringData& ARR_CString) */ + template TStringData& ZftMakeXmlAttEnc(TStringData& ARRoCStringData)*/ + + template TStringData& ZftMakeXmlAttDec(TStringData& ARRoCStringData) + { + return ARRoCStringData. + Replace(" " ,"\r" ). Replace(" " ,"\n"). + Replace(" " ,"\t" ). Replace(""","\""). + Replace(">" ,">" ). Replace("<" ,"<" ). Replace("&" ,"&" ); + }/* + template TStringData& ZftMakeXmlAttDec(TStringData& ARRoCStringData)*/ }/* namespace ZNsMain*/ diff --git a/ZCppMain/ZtCLoadXml.H b/ZCppMain/ZtCLoadXml.H index e3f34fa..2ce064c 100644 --- a/ZCppMain/ZtCLoadXml.H +++ b/ZCppMain/ZtCLoadXml.H @@ -4,6 +4,7 @@ #define __ZNSMAIN_ZTCLOADXML_H__ +#include "ZCppMain/ZMainXhtml.H" #include "ZCppMain/ZtCStringEx.H" #include "ZCppMain/ZtCTreeData.H" #include "ZCppMain/ZtCObjList.H" @@ -22,27 +23,6 @@ namespace ZNsMain namespace ZNsView*/ - template TCStringData& ZftMakeXmlAttEnc(TCStringData& ARR_CStringData) - { - return ARR_CStringData. - - Replace("&" ,"&" ).Replace("\r", " "). - Replace("\n", " " ).Replace("\t", " "). - Replace("\"", """).Replace(">" , ">" ).Replace("<", "<" ); - }/* - template TCStringData& ZftMakeXmlAttEnc(TCStringData& ARR_CStringData)*/ - - template TCStringData& ZftMakeXmlAttDec(TCStringData& ARR_CStringData) - { - return ARR_CStringData. - - Replace(" " ,"\r" ). Replace(" " ,"\n" ). - Replace(" " ,"\t" ). Replace(""","\"" ). - Replace(">" ,">" ). Replace("<" ,"<" ). Replace("&" ,"&" ); - }/* - template TCStringData& ZftMakeXmlAttDec(TCStringData& ARR_CStringData)*/ - - namespace ZNsType { diff --git a/ZCppMain/ZtCStringEx.H b/ZCppMain/ZtCStringEx.H index dc11732..b18b117 100644 --- a/ZCppMain/ZtCStringEx.H +++ b/ZCppMain/ZtCStringEx.H @@ -11,7 +11,6 @@ #include "ZCppMain/ZMainHead.H" #include "ZCppMain/ZMainHeadEx.H" -#include "ZCppMain/ZMainXhtml.H" #include "ZCppMain/ZtCMainChars.H" #include "ZCppMain/ZtCObjList.H" @@ -7749,19 +7748,6 @@ namespace ZNsMain int Compare(const TypeChar* APC_Data) const*/ - ZCStringBase& ConvertXhtml() - { - return ZNsMain::ZftConvertXhtml(*this); - }/* - ZCStringBase& ConvertXhtml()*/ - - ZCStringBase& ConvertXhtmlAtt() - { - return ZNsMain::ZftConvertXhtmlAtt(*this); - }/* - ZCStringBase& ConvertXhtmlAtt()*/ - - ZCStringBase& Fetch(ZCStringBase& rhs) { // rhs 로부터 문자열 메모리를 그대로 가져온다.