commit 2025-08-23 21:30 edit a bit ZCppMain/ZMainXhtml.H
This commit is contained in:
@ -7,29 +7,36 @@
|
||||
namespace ZNsMain
|
||||
{
|
||||
|
||||
template<typename TStringData> TStringData& ZftConvertXhtml(TStringData& ARR_CString)
|
||||
template<typename TStringData> TStringData& ZftConvertXhtml(TStringData& ARRoCString)
|
||||
{
|
||||
/* 데이타를 그대로 클라이언트에 전송하면
|
||||
HTML 태그와 혼동될 수 있는데 이를 방지하기 위해
|
||||
적절히 인코딩한다.
|
||||
/* 데이타를 그대로 클라이언트에 전송하면, HTML 태그와
|
||||
혼동될 수 있는데, 이를 방지하기 위해 적절히 인코딩한다.
|
||||
*/
|
||||
return ARR_CString.
|
||||
Replace("&" ,"&" ). Replace("<" ,"<" ).
|
||||
Replace(">" ,">" ). Replace(" " ," " ).
|
||||
Replace("\n","<br />" );
|
||||
return ARRoCString.
|
||||
Replace("&" ,"&" ). Replace("<" ,"<" ).
|
||||
Replace(">" ,">" ). Replace(" " ," ").
|
||||
Replace("\n","<br />" );
|
||||
}/*
|
||||
template<typename TStringData> static TStringData& ConvertXhtml(TStringData& ARR_CString) */
|
||||
template<typename TStringData> TStringData& ConvertXhtml(TStringData& ARRoCString) */
|
||||
|
||||
template<typename TStringData> TStringData& ZftConvertXhtmlAtt(TStringData& ARR_CString)
|
||||
|
||||
template<typename TStringData> 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<typename TStringData> TStringData& ZftConvertXhtmlAtt(TStringData& ARR_CString) */
|
||||
template<typename TStringData> TStringData& ZftMakeXmlAttEnc(TStringData& ARRoCStringData)*/
|
||||
|
||||
template<typename TStringData> TStringData& ZftMakeXmlAttDec(TStringData& ARRoCStringData)
|
||||
{
|
||||
return ARRoCStringData.
|
||||
Replace("
" ,"\r" ). Replace("
" ,"\n").
|
||||
Replace("	" ,"\t" ). Replace(""","\"").
|
||||
Replace(">" ,">" ). Replace("<" ,"<" ). Replace("&" ,"&" );
|
||||
}/*
|
||||
template<typename TStringData> TStringData& ZftMakeXmlAttDec(TStringData& ARRoCStringData)*/
|
||||
|
||||
}/*
|
||||
namespace ZNsMain*/
|
||||
|
Reference in New Issue
Block a user