Yona use 'jsoup' for parsing posting contents.
But some already escaped html contents are parsed wrong.
jsoup's node.text() method do unescape strings.
So, change to use node.toString() instead of node.text().
And Upgrade jsoup to 1.8.3 from 1.8.2
It is found that it is very costly job to render markdown
and sanitize it. So introduce two things.
LRU cache and compressing rendered text.
LRU cache is driven by google Guava.
Compressing text is accomplished using native java sdk.
Now, view page loading speed is about 15x faster!!
and cache size is 30% smaller.
Add new feature that can be used for data migration.
Only the site-admin can export and import data.
Data exporting is downloading a file that contains json strings
are generated by data from database. Data importing is
truncating tables and inserting all data read from json strings
that is in a uploaded file.
CAUTION: TO KEEP DATA INTEGRITY, PLEASE PREVENT OTHER REQUESTS
AND DO NOT ANYTHING ELSE WHILE DOING EXPORT/IMPORT
RECOMMEND YOU THAT MAKE ENVIRONMENT THAT ONLY THE SITE-ADMIN CAN ACCESS.
e.g.) stop proxy server and run the yobi on a port that only you know.
Codes are based on mainly works of
- Keesun Baik
- Yi EungJun
Tested export and import DB and version
- H2 1.3.176 to MariaDB 10.1.10
- H2 1.3.176 to MySQM 5.6.28
Markdown renderer might render issues that submitted via email ugly
because of newlines between HTML tags. The renderer rendered them as
` ` tags, which the author of the email did not intend. The numerous
` ` tags made the rendered result ugly.
To render it as expected, remove newlines between HTML tags by
HtmlCompressor.