diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index c7259cc7544..816c3f89bd0 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -389,16 +389,8 @@ define ('BLOG_COURSE_LEVEL', 3);
define ('BLOG_SITE_LEVEL', 4);
define ('BLOG_GLOBAL_LEVEL', 5);
-
-// Tag constants.
-/**
- * To prevent problems with multibytes strings,Flag updating in nav not working on the review page. this should not exceed the
- * length of "varchar(255) / 3 (bytes / utf-8 character) = 85".
- * TODO: this is not correct, varchar(255) are 255 unicode chars ;-)
- *
- * @todo define(TAG_MAX_LENGTH) this is not correct, varchar(255) are 255 unicode chars ;-)
- */
-define('TAG_MAX_LENGTH', 50);
+/** The maximum length of a tag */
+define('TAG_MAX_LENGTH', 255);
// Password policy constants.
define ('PASSWORD_LOWER', 'abcdefghijklmnopqrstuvwxyz');
diff --git a/tag/edit_form.php b/tag/edit_form.php
index d7b6e9ba633..8a628f9f295 100644
--- a/tag/edit_form.php
+++ b/tag/edit_form.php
@@ -14,14 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-
-/**
- * @package core_tag
- * @category tag
- * @copyright 2007 Luiz Cruz
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
@@ -57,8 +49,7 @@ class tag_edit_form extends moodleform {
$systemcontext = context_system::instance();
if (has_capability('moodle/tag:manage', $systemcontext)) {
- $mform->addElement('text', 'rawname', get_string('name', 'tag'),
- 'maxlength="'.TAG_MAX_LENGTH.'" size="'.TAG_MAX_LENGTH.'"');
+ $mform->addElement('text', 'rawname', get_string('name', 'tag'), ['maxlength' => TAG_MAX_LENGTH, 'size' => 50]);
$mform->setType('rawname', PARAM_TAG);
}