Class TextConverterBaseImpl
java.lang.Object
de.hybris.platform.sap.productconfig.runtime.interf.impl.TextConverterBaseImpl
- All Implemented Interfaces:
TextConverterBase
Default implementation of the
Note: This class will remove any markup from the ITF-Text, as this an potential attack vector. In case it is desired to display formatted ITF-Texts on the UI, this class needs to be enhanced/replaced. One should specify a white list of allowed markup for formatting.
TextConverterBaseNote: This class will remove any markup from the ITF-Text, as this an potential attack vector. In case it is desired to display formatted ITF-Texts on the UI, this class needs to be enhanced/replaced. One should specify a white list of allowed markup for formatting.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertLongText(String formattedText) Removes all meta text elements (bold, underline, etc.) out of the long text value, provided by the knowledge base.protected StringdeEscapeString(String escapedString) protected StringextractSection(String textWithSections) protected StringremoveFormatting(String formattedText) protected StringremoveMarkup(String markup) protected StringreplaceDoubleQuotes(String singleQuotes)
-
Constructor Details
-
TextConverterBaseImpl
public TextConverterBaseImpl()
-
-
Method Details
-
convertLongText
Description copied from interface:TextConverterBaseRemoves all meta text elements (bold, underline, etc.) out of the long text value, provided by the knowledge base.- Specified by:
convertLongTextin interfaceTextConverterBase- Parameters:
formattedText- The text to be cleansed- Returns:
- The converted text, which will be shown in the web frontend
-
removeFormatting
-
removeMarkup
-
extractSection
-
deEscapeString
-
replaceDoubleQuotes
-