mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #33471
[Bug 1558387] A change has been merged
Reviewed: https://reviews.mahara.org/6173
Committed: https://git.mahara.org/mahara/mahara/commit/f9c20cfd09388c5b531bc6079ea0b83ae3d6cb20
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: 15.10_STABLE
commit f9c20cfd09388c5b531bc6079ea0b83ae3d6cb20
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date: Thu Mar 17 18:34:45 2016 +1300
Use $CFG->cacheversion for HTMLPurifier cache version
Bug 1558387
With this, we don't have to remember to bump HTML.DefinitionRev in
html_clean(), or clear the htmlpurifier directory in dataroot.
behatnotneeded: API change only
Change-Id: I15cd291fd8e5d7d5c357f1595a89f34f44236e7d
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1558387
Title:
Use $CFG->cacheversion for HTMLPurifier revision number
Status in Mahara:
Fix Committed
Status in Mahara 1.10 series:
Fix Committed
Status in Mahara 15.04 series:
Fix Committed
Status in Mahara 15.10 series:
Fix Committed
Status in Mahara 16.04 series:
Fix Committed
Bug description:
As is the recommended practice, Mahara caches the computed form of its
HTMLPurifier rules, for performance. We have in place in clean_html()
a setting for "HTML.DefinitionID", with a comment that says that the
developer should increment that number if they make changes to the
HTML Purifier definition. But in the past we have *not* done that, and
instead manually deleted the htmlpurifier cache directory from the
dataroot.
It occurs to me that it would be simpler to set HTML.DefinitionRev to
"get_config('cacheversion')", so that it will be automatically cleared
whenever the Mahara system version changes. The a dev just needs to
bump version.php to make the HTMLPurifier cache get cleared.
This will cause the cache to be cleared more frequently than it needs
to be (we rarely make changes to our HTMLPurifier configuration), but
only once per Mahara upgrade, so that's still not too bad.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1558387/+subscriptions
References