1 64 65 package com.jcorporate.expresso.core.security.filters; 66 67 74 public class AllowedHtmlPlusURLFilter extends HtmlPlusURLFilter { 75 76 public static final String [] ALLOWED_HTML = { 77 "<b>", "</b>", "<i>", "</i>", "<em>", "</em>", "<strong>", "</strong>", 78 "<blockquote>", "</blockquote>", 79 "<ol>", "</ol>", "<ul>", "</ul>", "<li>", "</li>" 80 }; 81 82 86 public AllowedHtmlPlusURLFilter() 87 throws IllegalArgumentException { 88 super(appendArrays(SPECIAL_STRING_LIST, ALLOWED_HTML), 89 appendArrays(REPLACE_LIST, ALLOWED_HTML)); 90 } 91 92 private static String [] appendArrays(String [] array1, String [] array2) { 93 if (array1 == null || array2 == null) { 94 return null; 95 } 96 97 int totalLength = array1.length + array2.length; 98 String resultArray[] = new String [totalLength]; 99 for (int i = 0; i < array1.length; i++) { 100 resultArray[i] = array1[i]; 101 } 102 for (int i = 0; i < array2.length; i++) { 103 resultArray[array1.length + i] = array2[i]; 104 } 105 return resultArray; 106 } 107 } 108 | Popular Tags |