equal
deleted
inserted
replaced
|
1 /** |
|
2 * Copyright 2002-2004 The Apache Software Foundation |
|
3 * |
|
4 * Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 * you may not use this file except in compliance with the License. |
|
6 * You may obtain a copy of the License at |
|
7 * |
|
8 * http://www.apache.org/licenses/LICENSE-2.0 |
|
9 * |
|
10 * Unless required by applicable law or agreed to in writing, software |
|
11 * distributed under the License is distributed on an "AS IS" BASIS, |
|
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 * See the License for the specific language governing permissions and |
|
14 * limitations under the License. |
|
15 */ |
|
16 |
|
17 #ifndef _lucene_search_highlight_simplehtmlencoder_ |
|
18 #define _lucene_search_highlight_simplehtmlencoder_ |
|
19 |
|
20 #if defined(_LUCENE_PRAGMA_ONCE) |
|
21 # pragma once |
|
22 #endif |
|
23 |
|
24 #include "CLucene/util/StringBuffer.h" |
|
25 #include "Encoder.h" |
|
26 |
|
27 CL_NS_DEF2(search,highlight) |
|
28 |
|
29 /** |
|
30 * Simple {@link Encoder} implementation to escape text for HTML output |
|
31 * |
|
32 */ |
|
33 class SimpleHTMLEncoder:public Encoder |
|
34 { |
|
35 public: |
|
36 SimpleHTMLEncoder(void); |
|
37 ~SimpleHTMLEncoder(void); |
|
38 |
|
39 TCHAR* encodeText(TCHAR* originalText); |
|
40 |
|
41 /** |
|
42 * Encode string into HTML |
|
43 */ |
|
44 static TCHAR* htmlEncode(TCHAR* plainText) ; |
|
45 }; |
|
46 |
|
47 CL_NS_END2 |
|
48 |
|
49 #endif |