Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A flexible Java text processor. BB, BBCode, BB-code, HTML, Textile, Markdown, parser, translator, converter.

License

NotificationsYou must be signed in to change notification settings

kefirfromperm/kefirbb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build StatusDownloadMaven Centraljavadoc.ioOpenHUB

About

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.

Maven dependency

<dependency>    <groupId>org.kefirsf</groupId>    <artifactId>kefirbb</artifactId>    <version>1.5</version></dependency>

Usage

Convert BBCode

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]"));

HTML Filtration

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>"));

Convert Textile

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**"));

Convert Markdown

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**"));

Your custom configuration

Also you can use your own configuration or customize existing. Just put your own configuration toclasspath:kefirbb.xml.

Documentation

You can find full documentation inthe wiki of the project.

Support

You can report bugs atGitHub Issues. Also you can ask me questions by emailkefirfromperm@gmail.com.

Donation

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

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp