Commit cf77fc8f authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1851288: URL encode the . char in block title"

parents 4404d730 f4360be7
......@@ -190,6 +190,7 @@
var blockid = $(ev.currentTarget).data('blockid');
var option = $(ev.currentTarget).data('option');
var title = encodeURIComponent($('#instconf_title').val());
title = title.replace(/\./g, "%2E"); // Deal with . in the title
var isnew = $('#instconf_new').val() == '1' ? '1' : '0';
var pd = {
'id': $('#viewid').val(),
......
......@@ -2472,6 +2472,7 @@ class View {
if (!empty($values['title'])) {
$newtitle = hsc(urldecode($values['title']));
$newtitle = preg_replace('/\%2E/', '.', $newtitle); // Deal with . in title
}
$currentblocktags = get_records_sql_assoc("SELECT id, tag FROM {tag} WHERE resourcetype = ? AND resourceid = ?", array('blocktype', $currentblock->id));
// Set up a dummy block instance of new blocktype with the data we need
......@@ -2538,6 +2539,7 @@ class View {
safe_require('blocktype', 'placeholder');
$oldtitle = hsc(urldecode($values['title']));
$oldtitle = preg_replace('/\%2E/', '.', $oldtitle); // Deal with . in title
// Set up a dummy block instance of new blocktype with the data we need
// So we can get the initial display and configure form data
$bi = new BlockInstance(0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment