Explorar o código

Fix wiki new page title see BT#12557

jmontoyaa %!s(int64=8) %!d(string=hai) anos
pai
achega
13f5bc23d4
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      main/wiki/wiki.inc.php

+ 2 - 0
main/wiki/wiki.inc.php

@@ -823,6 +823,8 @@ class Wiki
         $form->addElement('text', 'title', get_lang('Title'));
         $form->addRule('title', get_lang('ThisFieldIsRequired'), 'required');
         self::setForm($form);
+        $title = isset($_GET['title']) ? Security::remove_XSS($_GET['title']) : '';
+        $form->setDefaults(['title' => $title]);
         $form->addElement('button', 'SaveWikiNew', get_lang('Save'));
         $form->display();