X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Ftext%2FTextInterpreterImpl.java;fp=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Ftext%2FTextInterpreterImpl.java;h=f9ee195a79960259916399f941f60556a82b694f;hb=147ada7da5bf6292569f17a53a77fca04c97f707;hp=0000000000000000000000000000000000000000;hpb=5431f941fd6161e89f495a330c2ecddaf4f6bfb1;p=gpl%2Fargeo-suite.git diff --git a/publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/TextInterpreterImpl.java b/publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/TextInterpreterImpl.java new file mode 100644 index 0000000..f9ee195 --- /dev/null +++ b/publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/TextInterpreterImpl.java @@ -0,0 +1,31 @@ +package org.argeo.cms.text; + +import javax.jcr.Item; +import javax.jcr.RepositoryException; + +/** + * Text interpreter that sanitise and validates before saving, and support CMS + * specific formatting and integration. + */ +class TextInterpreterImpl extends IdentityTextInterpreter { + private MarkupValidatorCopy markupValidator = MarkupValidatorCopy + .getInstance(); + + @Override + protected void validateBeforeStoring(String raw) { + markupValidator.validate(raw); + } + + @Override + protected String convertToStorage(Item item, String content) + throws RepositoryException { + return super.convertToStorage(item, content); + } + + @Override + protected String convertFromStorage(Item item, String content) + throws RepositoryException { + return super.convertFromStorage(item, content); + } + +}