mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #08919
[Bug 971289] A change has been merged
Reviewed: https://reviews.mahara.org/1140
Committed: http://gitorious.org/mahara/mahara/commit/c5753d29f59f14e8d8a1c6b5a94c2d456f46e724
Submitter: Hugh Davenport (hugh@xxxxxxxxxxxxxxx)
Branch: master
commit c5753d29f59f14e8d8a1c6b5a94c2d456f46e724
Author: Richard Mansfield <richard.mansfield@xxxxxxxxxxxxxxx>
Date: Mon Apr 2 16:52:01 2012 +1200
Use htmlpurifier in external media block (bug #971289)
Now that SafeEmbed and SafeIframe options of htmlpurifier are enabled,
the external media block can make use of them, rather than always
trying to parse and generate iframe and embed code for the supported
sites.
Any html pasted into the block configuration form is now allowed to
fall through to be sanitised by htmlpurfier, so the site-wide list of
allowed iframe sites will be used rather than the existing list of
supported sites in the external media block.
Valid URLs pasted into the configuration form are still processed by
the various media_sources regular expressions in
blocktype/externalvideo/media_sources/*/mediasource.php, but the
regexes that were previously designed to operate on embed/iframe code
have been removed, and the remaining ones have been modified to match
at the beginning of a url only.
When a URL is entered, and the block saved, the embed/iframe code to
be used when rendering the block is generated immediately, and
subsequent edits of the block will reveal only the generated
embed/iframe html. The render_instance function will still generate
the required embed code for old blocks that haven't been reconfigured
yet.
The glogster scraping code is also tightened slightly to ensure that a
URL is returned.
See https://wiki.mahara.org/index.php/Developer_Area/Specifications_in_Development/External_media_block_extension
Change-Id: I7024ab946f8a6965e78730eb1daa3441f220a10b
Signed-off-by: Richard Mansfield <richard.mansfield@xxxxxxxxxxxxxxx>
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/971289
Title:
Use htmlpurifier in external media block
Status in Mahara ePortfolio:
In Progress
Bug description:
We should remove custom parsing code from the external media block
where possible, and just let HTML Purifier filter the code when we
detect that the user has pasted embed code (as opposed to just a URL).
This will remove code duplication.
See
https://wiki.mahara.org/index.php/Developer_Area/Specifications_in_Development/External_media_block_extension
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/971289/+subscriptions
References