CREATE OR REPLACE FUNCTION FilterStr
(strVal VARCHAR2)
RETURN VARCHAR2
IS
strTmp VARCHAR2(2048) := strVal;
BEGIN
strTmp := replace(strTmp,chr(38),chr(38)||'amp;'); --chr(38) '&'
strTmp := replace(strTmp,'<',chr(38)||'lt;');
strTmp := replace(strTmp,'>',chr(38)||'gt;');
strTmp := replace(strTmp,'''',chr(38)||'apos;');
strTmp := replace(strTmp,'"',chr(38)||'quot;');
return strTmp;
END;
(strVal VARCHAR2)
RETURN VARCHAR2
IS
strTmp VARCHAR2(2048) := strVal;
BEGIN
strTmp := replace(strTmp,chr(38),chr(38)||'amp;'); --chr(38) '&'
strTmp := replace(strTmp,'<',chr(38)||'lt;');
strTmp := replace(strTmp,'>',chr(38)||'gt;');
strTmp := replace(strTmp,'''',chr(38)||'apos;');
strTmp := replace(strTmp,'"',chr(38)||'quot;');
return strTmp;
END;