| java.lang.Object org.jamwiki.parser.jflex.ParserUtil
ParserUtil | public class ParserUtil (Code) | | Utility methods used with the Mediawiki lexers.
|
Method Summary | |
protected static String | parseFragment(ParserInput parserInput, String raw, int mode) Provide a way to run the pre-processor against a fragment of text, such
as an image caption. | protected static String | sanitizeHtmlTag(String tag) Clean up HTML tags to make them XHTML compliant (lowercase, no
unnecessary spaces). | protected static String | tagContent(String raw) Given a tag of the form "content", return all content between
the tags. | protected static String | validateHtmlTag(String tag) Allowing Javascript action tags to be used as attributes (onmouseover, etc) is
a bad thing, so clean up HTML tags to remove any such attributes. | protected static String | validateHtmlTagAttributes(String attributes) Allowing Javascript action tags to be used as attributes (onmouseover, etc) is
a bad thing, so clean up HTML tags to remove any such attributes. |
parseFragment | protected static String parseFragment(ParserInput parserInput, String raw, int mode) throws Exception(Code) | | Provide a way to run the pre-processor against a fragment of text, such
as an image caption. This method should be used sparingly since it is
not very efficient.
|
sanitizeHtmlTag | protected static String sanitizeHtmlTag(String tag)(Code) | | Clean up HTML tags to make them XHTML compliant (lowercase, no
unnecessary spaces).
|
tagContent | protected static String tagContent(String raw)(Code) | | Given a tag of the form "content", return all content between
the tags. Consider the following examples:
"content" returns "content".
"" returns and empty string.
"content" returns "content".
Parameters: raw - The raw tag content to be analyzed. The content for the tag being analyzed. |
validateHtmlTag | protected static String validateHtmlTag(String tag)(Code) | | Allowing Javascript action tags to be used as attributes (onmouseover, etc) is
a bad thing, so clean up HTML tags to remove any such attributes.
|
validateHtmlTagAttributes | protected static String validateHtmlTagAttributes(String attributes)(Code) | | Allowing Javascript action tags to be used as attributes (onmouseover, etc) is
a bad thing, so clean up HTML tags to remove any such attributes.
|
|
|