diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index c900c5d..1b3ff1c 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -3677,6 +3677,46 @@ namespace ZNsCPP */ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/ + +namespace ZNsMain +{ + + template TStringData& ZftConvertXhtml(TStringData& ARRoCString) + { + /* 데이타를 그대로 클라이언트에 전송하면, HTML 태그와 + 혼동될 수 있는데, 이를 방지하기 위해 적절히 인코딩한다. + */ + return ARRoCString. + Replace("&" ,"&" ). Replace("<" ,"<" ). + Replace(">" ,">" ). Replace(" " ," "). + Replace("\n","
" ); + }/* + template TStringData& ConvertXhtml(TStringData& ARRoCString) */ + + + template TStringData& ZftMakeXmlAttEnc(TStringData& ARRoCStringData) + { + return ARRoCStringData. + Replace("&" , "&" ).Replace("\r", " " ). + Replace("\n", " " ).Replace("\t", " " ). + Replace("\"", """).Replace(">" , ">" ).Replace("<", "<"); + }/* + 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*/ + + + /*/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ■ 4.1 자동적으로 정의되는 심볼들 diff --git a/ZCppMain/ZMainXhtml.H b/ZCppMain/ZMainXhtml.H deleted file mode 100644 index e4b6ccf..0000000 --- a/ZCppMain/ZMainXhtml.H +++ /dev/null @@ -1,45 +0,0 @@ - - -#ifndef __ZCPPMAIIN__ZMAINXHTML_H__ -#define __ZCPPMAIIN__ZMAINXHTML_H__ - - -namespace ZNsMain -{ - - template TStringData& ZftConvertXhtml(TStringData& ARRoCString) - { - /* 데이타를 그대로 클라이언트에 전송하면, HTML 태그와 - 혼동될 수 있는데, 이를 방지하기 위해 적절히 인코딩한다. - */ - return ARRoCString. - Replace("&" ,"&" ). Replace("<" ,"<" ). - Replace(">" ,">" ). Replace(" " ," "). - Replace("\n","
" ); - }/* - template TStringData& ConvertXhtml(TStringData& ARRoCString) */ - - - template TStringData& ZftMakeXmlAttEnc(TStringData& ARRoCStringData) - { - return ARRoCStringData. - Replace("&" , "&" ).Replace("\r", " " ). - Replace("\n", " " ).Replace("\t", " " ). - Replace("\"", """).Replace(">" , ">" ).Replace("<", "<"); - }/* - 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*/ - - -#endif // __ZCPPMAIIN__ZMAINXHTML_H__ diff --git a/ZCppMain/ZtCLoadXml.H b/ZCppMain/ZtCLoadXml.H index 4d2140e..6dcd7d0 100644 --- a/ZCppMain/ZtCLoadXml.H +++ b/ZCppMain/ZtCLoadXml.H @@ -4,7 +4,6 @@ #define __ZNSMAIN_ZTCLOADXML_H__ -#include "ZCppMain/ZMainXhtml.H" #include "ZCppMain/ZtCStringEx.H" #include "ZCppMain/ZtCTreeData.H" #include "ZCppMain/ZtCObjList.H"