Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork14
A flexible Java text processor. BB, BBCode, BB-code, HTML, Textile, Markdown, parser, translator, converter.
License
kefirfromperm/kefirbb
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
KefirBB is a Java-library for text processing. Initially it was developed for BBCode (Bulletin Board Code) to HTMLtranslation. But flexible configuration allows to use it in different cases. For example XML-to-HTML translation orfor HTML filtration. Now it supports Textile and Markdown markup languages. Actually it's the most powerfull and flexible Java-library for BBCode parsing.
<dependency> <groupId>org.kefirsf</groupId> <artifactId>kefirbb</artifactId> <version>1.5</version></dependency>
KefirBB fully supports converting from BBCode markup language to HTML. The syntax of BBCode is described atBBCode - Wikipedia.
TextProcessorprocessor =BBProcessorFactory.getInstance().create();assert"<b>text</b>".equals(processor.process("[b]text[/b]"));
If you don't want to use special markup languages in your site but you have to safe your users from XSS-attacksyou can use KefirBB configuration for HTMl filtration. It prevents using of javascript, styles etc.
TextProcessorprocessor =BBProcessorFactory.getInstance() .createFromResource(ConfigurationFactory.SAFE_HTML_CONFIGURATION_FILE);assert"<b>text</b>".equals(processor.process("<b onclick=\"#">test</B>"));
KefirBB fully supports Textile markup language. It's described atTxStyle
TextProcessorprocessor =BBProcessorFactory.getInstance() .createFromResource(ConfigurationFactory.TEXTILE_CONFIGURATION_FILE);assert"<p><b>text</b></p>".equals(processor.process("**text**"));
KefirBB supports Markdown markup language partially described atMarkdown Syntax. It doesn't support fully blockquotes and lists.
TextProcessorprocessor =BBProcessorFactory.getInstance() .createFromResource(ConfigurationFactory.MARKDOWN_CONFIGURATION_FILE);assert"<p><strong>text</strong></p>".equals(processor.process("**text**"));
Also you can use your own configuration or customize existing. Just put your own configuration toclasspath:kefirbb.xml
.
You can find full documentation inthe wiki of the project.
You can report bugs atGitHub Issues. Also you can ask me questions by emailkefirfromperm@gmail.com.
If you want to give me a beer just send some money tohttps://www.paypal.me/kefir
About
A flexible Java text processor. BB, BBCode, BB-code, HTML, Textile, Markdown, parser, translator, converter.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.