1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!--NewPage--> 3<HTML> 4<HEAD> 5<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> 6<TITLE> 7UrlTextExample (OWASP Java HTML Sanitizer) 8</TITLE> 9 10 11<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> 12 13<SCRIPT type="text/javascript"> 14function windowTitle() 15{ 16 if (location.href.indexOf('is-external=true') == -1) { 17 parent.document.title="UrlTextExample (OWASP Java HTML Sanitizer)"; 18 } 19} 20</SCRIPT> 21<NOSCRIPT> 22</NOSCRIPT> 23 24</HEAD> 25 26<BODY BGCOLOR="white" onload="windowTitle();"> 27<HR> 28 29 30<!-- ========= START OF TOP NAVBAR ======= --> 31<A NAME="navbar_top"><!-- --></A> 32<A HREF="#skip-navbar_top" title="Skip navigation links"></A> 33<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 34<TR> 35<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 36<A NAME="navbar_top_firstrow"><!-- --></A> 37<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 38 <TR ALIGN="center" VALIGN="top"> 39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 41 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UrlTextExample.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 46 </TR> 47</TABLE> 48</TD> 49<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 50<a href="http://code.google.com/p/owasp-java-html-sanitizer" target=_top>code.google.com home</a></EM> 51</TD> 52</TR> 53 54<TR> 55<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 56 <A HREF="../../../../org/owasp/html/examples/SlashdotPolicyExample.html" title="class in org.owasp.html.examples"><B>PREV CLASS</B></A> 57 NEXT CLASS</FONT></TD> 58<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 59 <A HREF="../../../../index.html?org/owasp/html/examples/UrlTextExample.html" target="_top"><B>FRAMES</B></A> 60 <A HREF="UrlTextExample.html" target="_top"><B>NO FRAMES</B></A> 61 <SCRIPT type="text/javascript"> 62 <!-- 63 if(window==top) { 64 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 65 } 66 //--> 67</SCRIPT> 68<NOSCRIPT> 69 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 70</NOSCRIPT> 71 72 73</FONT></TD> 74</TR> 75<TR> 76<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 77 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> 78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 79DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> 80</TR> 81</TABLE> 82<A NAME="skip-navbar_top"></A> 83<!-- ========= END OF TOP NAVBAR ========= --> 84 85<HR> 86<!-- ======== START OF CLASS DATA ======== --> 87<H2> 88<FONT SIZE="-1"> 89org.owasp.html.examples</FONT> 90<BR> 91Class UrlTextExample</H2> 92<PRE> 93java.lang.Object 94 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.owasp.html.examples.UrlTextExample</B> 95</PRE> 96<HR> 97<DL> 98<DT><PRE>public class <A HREF="../../../../src-html/org/owasp/html/examples/UrlTextExample.html#line.48"><B>UrlTextExample</B></A><DT>extends java.lang.Object</DL> 99</PRE> 100 101<P> 102Uses a custom event receiver to emit the domain of a link or inline image 103 after the link or image. 104<P> 105 106<P> 107<HR> 108 109<P> 110 111<!-- ======== CONSTRUCTOR SUMMARY ======== --> 112 113<A NAME="constructor_summary"><!-- --></A> 114<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 115<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 116<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 117<B>Constructor Summary</B></FONT></TH> 118</TR> 119<TR BGCOLOR="white" CLASS="TableRowColor"> 120<TD><CODE><B><A HREF="../../../../org/owasp/html/examples/UrlTextExample.html#UrlTextExample()">UrlTextExample</A></B>()</CODE> 121 122<BR> 123 </TD> 124</TR> 125</TABLE> 126 127<!-- ========== METHOD SUMMARY =========== --> 128 129<A NAME="method_summary"><!-- --></A> 130<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 131<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 132<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 133<B>Method Summary</B></FONT></TH> 134</TR> 135<TR BGCOLOR="white" CLASS="TableRowColor"> 136<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 137<CODE>static void</CODE></FONT></TD> 138<TD><CODE><B><A HREF="../../../../org/owasp/html/examples/UrlTextExample.html#main(java.lang.String...)">main</A></B>(java.lang.String... argv)</CODE> 139 140<BR> 141 </TD> 142</TR> 143<TR BGCOLOR="white" CLASS="TableRowColor"> 144<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 145<CODE>static void</CODE></FONT></TD> 146<TD><CODE><B><A HREF="../../../../org/owasp/html/examples/UrlTextExample.html#run(java.lang.Appendable, java.lang.String...)">run</A></B>(java.lang.Appendable out, 147 java.lang.String... argv)</CODE> 148 149<BR> 150 </TD> 151</TR> 152</TABLE> 153 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 154<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 155<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 156<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> 157</TR> 158<TR BGCOLOR="white" CLASS="TableRowColor"> 159<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> 160</TR> 161</TABLE> 162 163<P> 164 165<!-- ========= CONSTRUCTOR DETAIL ======== --> 166 167<A NAME="constructor_detail"><!-- --></A> 168<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 169<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 170<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 171<B>Constructor Detail</B></FONT></TH> 172</TR> 173</TABLE> 174 175<A NAME="UrlTextExample()"><!-- --></A><H3> 176UrlTextExample</H3> 177<PRE> 178public <A HREF="../../../../src-html/org/owasp/html/examples/UrlTextExample.html#line.48"><B>UrlTextExample</B></A>()</PRE> 179<DL> 180</DL> 181 182<!-- ============ METHOD DETAIL ========== --> 183 184<A NAME="method_detail"><!-- --></A> 185<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 186<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 187<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 188<B>Method Detail</B></FONT></TH> 189</TR> 190</TABLE> 191 192<A NAME="run(java.lang.Appendable, java.lang.String...)"><!-- --></A><H3> 193run</H3> 194<PRE> 195public static void <A HREF="../../../../src-html/org/owasp/html/examples/UrlTextExample.html#line.120"><B>run</B></A>(java.lang.Appendable out, 196 java.lang.String... argv) 197 throws java.io.IOException</PRE> 198<DL> 199<DD><DL> 200 201<DT><B>Throws:</B> 202<DD><CODE>java.io.IOException</CODE></DL> 203</DD> 204</DL> 205<HR> 206 207<A NAME="main(java.lang.String...)"><!-- --></A><H3> 208main</H3> 209<PRE> 210public static void <A HREF="../../../../src-html/org/owasp/html/examples/UrlTextExample.html#line.155"><B>main</B></A>(java.lang.String... argv) 211 throws java.io.IOException</PRE> 212<DL> 213<DD><DL> 214 215<DT><B>Throws:</B> 216<DD><CODE>java.io.IOException</CODE></DL> 217</DD> 218</DL> 219<!-- ========= END OF CLASS DATA ========= --> 220<HR> 221 222 223<!-- ======= START OF BOTTOM NAVBAR ====== --> 224<A NAME="navbar_bottom"><!-- --></A> 225<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 226<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 227<TR> 228<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 229<A NAME="navbar_bottom_firstrow"><!-- --></A> 230<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 231 <TR ALIGN="center" VALIGN="top"> 232 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 233 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 234 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 235 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UrlTextExample.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 236 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 237 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 238 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 239 </TR> 240</TABLE> 241</TD> 242<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 243<a href="http://code.google.com/p/owasp-java-html-sanitizer" target=_top>code.google.com home</a></EM> 244</TD> 245</TR> 246 247<TR> 248<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 249 <A HREF="../../../../org/owasp/html/examples/SlashdotPolicyExample.html" title="class in org.owasp.html.examples"><B>PREV CLASS</B></A> 250 NEXT CLASS</FONT></TD> 251<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 252 <A HREF="../../../../index.html?org/owasp/html/examples/UrlTextExample.html" target="_top"><B>FRAMES</B></A> 253 <A HREF="UrlTextExample.html" target="_top"><B>NO FRAMES</B></A> 254 <SCRIPT type="text/javascript"> 255 <!-- 256 if(window==top) { 257 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 258 } 259 //--> 260</SCRIPT> 261<NOSCRIPT> 262 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 263</NOSCRIPT> 264 265 266</FONT></TD> 267</TR> 268<TR> 269<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 270 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> 271<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 272DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> 273</TR> 274</TABLE> 275<A NAME="skip-navbar_bottom"></A> 276<!-- ======== END OF BOTTOM NAVBAR ======= --> 277 278<HR> 279 280</BODY> 281</HTML> 282