Skip to content

Commit

Permalink
Merge pull request #75 from mebis-lp/MBS-7648-Wrap_text_and_title_tag…
Browse files Browse the repository at this point in the history
…s_properly

MBS-7648: Wrap text and title tags properly
  • Loading branch information
sh-csg authored Jun 3, 2023
2 parents 69bf1c5 + 904917d commit 1dda83e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions classes/mapworker.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ class mapworker {
*/
public function __construct(string $svgcode, array $placestore, \cm_info $cm = null, bool $edit = false, int $group = 0) {
global $CFG, $USER;
$svgcode = preg_replace('/<text(.*)>(?!(<\!\[CDATA\[))(.*)<\/text>/',
'<text$1><![CDATA[$3]]></text>',
$svgcode);
$svgcode = preg_replace('/<title(.*)>(?!(<\!\[CDATA\[))(.*)<\/title>/',
'<title$1><![CDATA[$3]]></title>',
$svgcode);
$this->svgcode = $svgcode;
$this->placestore = $placestore;
$this->edit = $edit;
Expand Down
4 changes: 2 additions & 2 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
function xmldb_learningmap_upgrade($oldversion) {
global $DB;

if ($oldversion < 2023011004) {
if ($oldversion < 2023050601) {
$entries = $DB->get_records('learningmap', []);
if ($entries) {
foreach ($entries as $entry) {
Expand All @@ -49,7 +49,7 @@ function xmldb_learningmap_upgrade($oldversion) {
$DB->update_record('learningmap', $entry);
}
}
upgrade_mod_savepoint(true, 2023011004, 'learningmap');
upgrade_mod_savepoint(true, 2023050601, 'learningmap');
}
return true;
}
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_learningmap';
$plugin->release = '0.9.3';
$plugin->version = 2023032402;
$plugin->release = '0.9.4';
$plugin->version = 2023050601;
$plugin->requires = 2020061500;
$plugin->supported = [39, 402];
$plugin->maturity = MATURITY_BETA;

0 comments on commit 1dda83e

Please sign in to comment.