RepHtmlcode.html
5.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<html>
<head>
<title>過濾字符</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<style type="text/css">
html, body {
background: ButtonFace;
color: ButtonText;
font: 11px Tahoma,Verdana,sans-serif;
margin: 0px;
padding: 0px;
}
body { padding: 5px; }
table {
font: 11px Tahoma,Verdana,sans-serif;
}
form p {
margin-top: 5px;
margin-bottom: 5px;
}
.fl { width: 6em; float: left; padding: 2px 5px; text-align: right; }
.fr { width: 7em; float: left; padding: 2px 5px; text-align: right; }
fieldset { padding: 0px 10px 5px 5px; }
select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
button { width: 70px; }
.space { padding: 2px; }
.title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
border-bottom: 1px solid black; letter-spacing: 2px;
}
form { padding: 0px; margin: 0px; }
</style>
<script src="../common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var dialogArguments = dialog.Args() ;
// Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ;
window.onload = function(){
dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
}
function Ok(){
if(!confirm('確認要過濾?'))
{
return false;
}
var r;
var s=0;
var D=oDOM.body.innerHTML;
var obj=document.repform;
if(obj.href1.checked)
{
s=1;
reg = /<a[^>]*?>([\w\W]*?)<\/a>/ig;
D=D.replace(reg,"$1");
}
if(obj.href2.checked)
{
s=1;
reg = /<a[^>]*?>([\w\W]*?)<\/a>/ig;
D=D.replace(reg,"");
}
if(obj.iframe.checked)
{
s=1;
reg = /<iframe[^>]*?>([\w\W]*?)<\/iframe>/ig;
D=D.replace(reg,"");
}
if(obj.object.checked)
{
s=1;
reg = /<object[^>]*?>([\w\W]*?)<\/object>/ig;
D=D.replace(reg,"");
}
if(obj.script.checked)
{
s=1;
reg = /<script[^>]*?>([\w\W]*?)<\/script>/ig;
D=D.replace(reg,"");
}
if(obj.style.checked)
{
s=1;
reg = /<style[^>]*?>([\w\W]*?)<\/style>/ig;
D=D.replace(reg,"");
}
if(obj.div1.checked)
{
s=1;
reg = /<div[^>]*?>([\w\W]*?)<\/div>/ig;
D=D.replace(reg,"$1");
}
if(obj.div2.checked)
{
s=1;
reg = /<div[^>]*?>([\w\W]*?)<\/div>/ig;
D=D.replace(reg,"");
}
if(obj.span1.checked)
{
s=1;
reg = /<span[^>]*?>([\w\W]*?)<\/span>/ig;
D=D.replace(reg,"$1");
}
if(obj.span2.checked)
{
s=1;
reg = /<span[^>]*?>([\w\W]*?)<\/span>/ig;
D=D.replace(reg,"");
}
if(obj.table.checked)
{
s=1;
reg = /<table[^>]*?>([\w\W]*?)<\/table>/ig;
D=D.replace(reg,"");
}
if(obj.img.checked)
{
s=1;
reg = /<img[^>]*?>/ig;
D=D.replace(reg,"");
}
if(obj.font1.checked)
{
s=1;
reg = /<font[^>]*?>([\w\W]*?)<\/font>/ig;
D=D.replace(reg,"$1");
}
if(obj.font2.checked)
{
s=1;
reg = /<font[^>]*?>([\w\W]*?)<\/font>/ig;
D=D.replace(reg,"");
}
if(obj.form.checked)
{
s=1;
reg = /<form[^>]*?>([\w\W]*?)<\/form>/ig;
D=D.replace(reg,"");
}
if(s==1)
{
oEditor.FCKUndo.SaveUndoStep();
oEditor.FCK.SetData(D);
}
return true;
}
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<form action="" method="post" name="repform">
<tr>
<td> <fieldset>
<legend>字符過慮設置</legend>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td><input name="href1" type="checkbox" id="href1" value="1">
A: 過濾鏈接(字留下,鏈接去除)</td>
</tr>
<tr>
<td><input name="href2" type="checkbox" id="href2" value="1">
A: 過濾鏈接(字與鏈接都去除)</td>
</tr>
<tr>
<td><input name="iframe" type="checkbox" id="iframe" value="1">
Iframe: 過濾內聯頁</td>
</tr>
<tr>
<td><input name="object" type="checkbox" id="object" value="1">
Object:過濾FLASH,控件等</td>
</tr>
<tr>
<td><input name="script" type="checkbox" id="script" value="1">
Script:過濾JS等腳本</td>
</tr>
<tr>
<td><input name="style" type="checkbox" id="style" value="1">
Style: 過濾CSS類</td>
</tr>
<tr>
<td><input name="div1" type="checkbox" id="div1" value="1">
Div: 過濾層(保留中間的字)</td>
</tr>
<tr>
<td><input name="div2" type="checkbox" value="1">
Div: 過濾層(不保留中間的字)</td>
</tr>
<tr>
<td><input name="span1" type="checkbox" id="span1" value="1">
Span: 過濾Span容器(保留中間的字)</td>
</tr>
<tr>
<td><input name="span2" type="checkbox" id="span2" value="1">
Span: 過濾Span容器(不保留中間的字)</td>
</tr>
<tr>
<td><input name="table" type="checkbox" id="table" value="1">
Table: 過濾表格</td>
</tr>
<tr>
<td><input name="img" type="checkbox" id="img" value="1">
Img: 過濾圖片</td>
</tr>
<tr>
<td><input name="font1" type="checkbox" id="font1" value="1">
Font: 過濾字體(保留中間的字)</td>
</tr>
<tr>
<td><input name="font2" type="checkbox" id="font3" value="1">
Font: 過濾字體(不保留中間的字)</td>
</tr>
<tr>
<td><input name="form" type="checkbox" id="form" value="1">
Form: 過濾表單</td>
</tr>
</table>
</fieldset></td>
</tr>
</form>
</table>
</body>
</html>