b781948f21
HTMLParser now parses correctly such entities: & < > " '
Tomasz Sowa2021-12-02 17:44:41 +01:00
2dadfc0809
added: HTMLParser::ItemParsedListener listener with an item_parsed(...) method which is called when a tag is parsed by the parser
Tomasz Sowa2021-11-30 16:27:27 +01:00
bb9205a55e
added: Space::Space(const Date & date), Space::set(const Date & date), Space::add(const Date & date), Space::add(const wchar_t * field, const Date & date)
Tomasz Sowa2021-11-05 09:27:32 +01:00
5eff9a5f4f
Space::to_bool() return true now when a string/object or table is non empty
Tomasz Sowa2021-10-20 08:30:57 +02:00
c54c398828
fixed in HTMLParser: </nofilter> tag was printed
Tomasz Sowa2021-10-13 00:40:55 +02:00
17d2c0fb25
- added some converting methods: esc_to_json(...), esc_to_xml(...), esc_to_csv() (convert/misc.h) - BaseParser: added possibility to read from TextStream and WTextStream - HTMLParser: added filter(const WTextStream & in, Stream & out, ...) method - added utf8_stream.h with one method: template<typename StreamIteratorType> size_t utf8_to_int( StreamIteratorType & iterator_in, StreamIteratorType & iterator_end, int & res, bool & correct)
Tomasz Sowa2021-10-12 19:53:11 +02:00
4902eb6037
fixed: in HTMLParser::CheckClosingTags() don't return immediately if stack_len is equal to 2
Tomasz Sowa2021-10-03 13:22:49 +02:00
f23cabfb2f
added to HTMLParser: filter_file(...) methods for filtering from a file
Tomasz Sowa2021-10-02 20:34:19 +02:00
5b2583b566
fixed in HTMLParser: sometimes a closing item left on the stack, for stack_len < 3 there was not PopStack() called
Tomasz Sowa2021-10-02 18:45:02 +02:00
2576eb12d1
HTMLParser: start working on xml mode added methods: Status parse_xml_file(const char * file_name, Space & out_space, bool compact_mode = false, bool clear_space = true); Status parse_xml_file(const std::string & file_name, Space & out_space, bool compact_mode = false, bool clear_space = true); Status parse_xml_file(const wchar_t * file_name, Space & out_space, bool compact_mode = false, bool clear_space = true); Status parse_xml_file(const std::wstring & file_name, Space & out_space, bool compact_mode = false, bool clear_space = true);
Tomasz Sowa2021-08-10 21:56:04 +02:00
b1cc64a29b
added a compact_mode option when creating a space output
Tomasz Sowa2021-08-10 01:45:10 +02:00
b8a03bf852
HTMLParser: added possibility to parse html to Space class added method: HTMLParser::parse_html(const wchar_t * in, Space & space)
Tomasz Sowa2021-08-07 21:21:16 +02:00
7fcfdac52f
Space: added pretty_print parameter to some json serializing methods
Tomasz Sowa2021-08-07 21:19:38 +02:00
8c5ede5cf3
HTMLParser: for <script> and <!- (comments) we copy the content without parsing
Tomasz Sowa2021-08-07 02:13:13 +02:00
f6df8bc1bc
HTMLFilter: added a std::vector<int> stack for a current white mode - white chars mode can be changed by such tags: <textarea>, <pre>, <script>, <nofilter>
Tomasz Sowa2021-07-21 15:57:46 +02:00
c0e940c500
fixed improper new line character after <single/> items, added Item::new_line_before flag
Tomasz Sowa2021-07-21 11:30:49 +02:00
4f8ae6ce29
some work in HTMLFilter - instead of directly using pchar pointer now we use pointers/streams from BaseParser - removed support for putting a white char in long words: removed BreakWord(size_t break_after_) method - changed the way how white characters are treated: added white_chars_mode(int mode) method mode 0: WHITE_MODE_ORIGIN mode 1: WHITE_MODE_SINGLE_LINE mode 2: WHITE_MODE_TREE
Tomasz Sowa2021-07-20 20:48:01 +02:00
7ce07c57f5
added a base class for parsers: BaseParser (convert/baseparser.h|cpp) there are methods for reading from string/files there those methods were moved from SpaceParser and CSVParser fixed: CSVParser didn't set input_as_utf8 flag
Tomasz Sowa2021-07-17 14:38:22 +02:00
2a3f43c5c3
added BBCODEParser (html/bbcodeparser.h|cpp) - copied from winix project
Tomasz Sowa2021-07-17 13:54:03 +02:00
bdb2616f32
added: HTMLFilter (html/htmlfilter.h|cpp) - copied from winix project
Tomasz Sowa2021-07-17 13:35:10 +02:00
1e5598cde1
added to Date: SerializeMonthAsRoman(Stream & out, int month) - serialize month in Roman numerals added a param: 'bool roman_month' to some serialize methods
Tomasz Sowa2021-07-06 21:44:04 +02:00
198945c97b
PatternReplacerBase: to_string() changed to to_str()
Tomasz Sowa2021-07-06 21:42:42 +02:00
34f1fc04cf
added Space::remove(size_t table_index) for removing a table item fixed: pretty printing for Space format
Tomasz Sowa2021-06-29 23:25:31 +02:00
8997284b16
added trim(...) functions to convert/text.h
Tomasz Sowa2021-06-29 23:23:35 +02:00
e0d6e7fcb1
added to Space: Space & get_add_space(const wchar_t * field); Space & get_add_space(const std::wstring & field);
Tomasz Sowa2021-06-27 15:58:53 +02:00
009e240a8d
fixed some memory leaks in Space, pointers in tables and objects were not correctly 'deleted', affected methods: set_empty_table() set_empty_object() add(const wchar_t * field, Space && space) copy_value_object(const Value & value_from) copy_value_table(const Value & value_from) initialize_value_object_if_needed(ObjectType && obj) initialize_value_table_if_needed(TableType && tab) add_generic(const wchar_t * field, const ArgType & val)
Tomasz Sowa2021-06-27 15:41:38 +02:00
4a1630b1ea
removed support for so called child objects from Space (this was an old feature of Space struct, now not needed) Space::get_object_field(...) renamed to Space::get_space(...)
Tomasz Sowa2021-06-26 22:56:12 +02:00
8ec9350d52
added two functions to utf8: template<typename StreamType> bool utf8_to_wide(const Stream & stream, StreamType & res, bool clear = true, int mode = 1); template<typename StreamType> bool wide_stream_to_utf8(const Stream & stream, StreamType & utf8, bool clear = true, int mode = 1);
Tomasz Sowa2021-06-25 19:10:01 +02:00
4d9f5f6c55
Log class has the Stream class as a base class now - implemented some missing operators<<(...) - removed Manipulators: l1, l2, l3, l4, lend, lsave - PascalCase to snake_case in Log
Tomasz Sowa2021-06-24 20:52:48 +02:00
2b6789754f
implemented pretty printing in Space::serialize_to_json_stream(StreamType & str, bool pretty_print, int level)
Tomasz Sowa2021-06-23 21:54:34 +02:00