Package sk.iway.iwcm.system.jpa
Class PageTitleAttributeConverter
java.lang.Object
sk.iway.iwcm.system.jpa.PageTitleAttributeConverter
public class PageTitleAttributeConverter
extends Object
implements jakarta.persistence.AttributeConverter<String,String>
Keeps page and history titles safe on both database writes and reads.
USES ALSO Tools.convertToHtmlTags(value) to convert legacy *|...|* to HTML
PageTitleAttributeConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToDatabaseColumn(String value) convertToEntityAttribute(String value) static StringsanitizeTitle(String value) Retains safe title formatting after decoding the legacy WebJET HTML notation.
-
Constructor Details
-
PageTitleAttributeConverter
public PageTitleAttributeConverter()
-
-
Method Details
-
convertToDatabaseColumn
-
convertToEntityAttribute
-
sanitizeTitle
Retains safe title formatting after decoding the legacy WebJET HTML notation. Page titles cannot opt into executable HTML through thejpaentitybypass.- Parameters:
value- title or navigation label, possibly loaded through JDBC- Returns:
- sanitized HTML, preserving
null
-