From 016b40f99d679f0787f7c8a5f61f4a411b6c3632 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 23 Apr 2017 12:46:48 +0200 Subject: Render comments when storing them in the database Instead of converting package comments from plain text to HTML code when they are displayed, do the conversion when the comment is posted and store the rendered result in the database. The conversion itself is done by a Python script which uses Bleach for sanitizing the text. Signed-off-by: Lukas Fleischer --- upgrading/4.6.0.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'upgrading/4.6.0.txt') diff --git a/upgrading/4.6.0.txt b/upgrading/4.6.0.txt index 45740f40..b051baca 100644 --- a/upgrading/4.6.0.txt +++ b/upgrading/4.6.0.txt @@ -9,3 +9,9 @@ UPDATE PackageDepends SET DepName = SUBSTRING(DepName FROM 1 FOR POSITION(': ' IN DepName) - 1) WHERE POSITION(': ' IN DepName) > 0; --- + +2. Add RenderedComment column to PackageComments: + +--- +ALTER TABLE PackageComments ADD COLUMN RenderedComment TEXT NOT NULL; +--- -- cgit v1.2.3-24-g4f1b