There will be a method of storing double-quoted titles into the database in asp. Friends who need it can refer to the copy code. The code is as follows:
title=request(title)
title=replace(title,chr(34),)
When double quotes appear in asp, change them to two double quotes
asp replace single quotes with double quotes
Some netizens reported that replacing single quotes ' with double quotes will cause syntax errors when using replace(string,',)
The correct way to write it is replace(string,',)
or:
replace(string,chr(39), chr(34))
Copy the code code as follows:
Function EChar(ParaStr)
ParaStr=trim(ParaStr)
ParaStr=replace(ParaStr,chr(39),')
ParaStr=replace(ParaStr,chr(34),)
EChar=ParaStr
End function
Function DChar(ParaStr)
ParaStr=replace(ParaStr,',chr(39))
ParaStr=replace(ParaStr,,chr(34))
DChar=ParaStr
End function