package ru.org.linux.util.bbcode;

import java.sql.Connection;
import java.util.EnumSet;

/**
 * Created by IntelliJ IDEA.
 * User: hizel
 * Date: 6/30/11
 * Time: 9:51 PM
 */
public class ParserUtil {

    private static final Parser parserWithImages = new Parser(EnumSet.of(Parser.ParserFlags.ENABLE_IMG_TAG));

    public static String bb2xhtml(String bbcode, Connection db){
        return parserWithImages.parse(bbcode).renderXHtml(db);
    }

    public static String bb2xhtml(String bbcode, boolean renderCut, String cutUrl, Connection db){
        return parserWithImages.parse(bbcode, renderCut, cutUrl).renderXHtml(db);
    }
}

@@ -195,17 +195,16 @@
 rUtil %7B%0A
-%0A
     priv
@@ -265,17 +265,21 @@
 EnumSet.
-o
+noneO
 f(Parser
@@ -295,22 +295,13 @@
 ags.
-ENABLE_IMG_TAG
+class
 ));%0A

disable IMG tag