DBA Data[Home] [Help]

PACKAGE BODY: APPS.FND_CSS_PKG

Source


1 package body FND_CSS_PKG as
2 /* $Header: afcssb.pls 115.0 2003/11/10 21:27:24 dehu noship $ */
3 
4 --
5 -- Encode
6 --   Substitutes the occurence of special characters like <, >, ', ", &
7 --   with their html codes in any arbitrary string.
8 -- IN
9 --   some_text - text to be substituted
10 -- RETURN
11 --   substituted text
12 -- EXCEPTION
13 --   system-defined VALUE_ERROR if length of return string is greater than
14 --   32767
15 
16 function Encode(some_text in varchar2)
17 return varchar2 is
18   l_amp     varchar2(1) := '&';
19 begin
20   return replace(replace(replace(replace(replace(some_text, l_amp, l_amp||'amp;'),
21                                          '<', l_amp||'lt;'),
22                                  '>', l_amp||'gt;'),
23                          '''', l_amp||'#39;'),
24                  '"', l_amp||'#34;');
25 end Encode;
26 
27 End FND_CSS_PKG;