diff --git a/admin/tool/lp/classes/form/competency.php b/admin/tool/lp/classes/form/competency.php
index 915ea6f43a8..32136bc5155 100644
--- a/admin/tool/lp/classes/form/competency.php
+++ b/admin/tool/lp/classes/form/competency.php
@@ -102,7 +102,7 @@ class competency extends persistent {
$mform->setType('description', PARAM_RAW);
// ID number.
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
- $mform->setType('idnumber', PARAM_TEXT);
+ $mform->setType('idnumber', PARAM_RAW);
$mform->addRule('idnumber', null, 'required', null, 'client');
$mform->addRule('idnumber', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
diff --git a/admin/tool/lp/classes/form/competency_framework.php b/admin/tool/lp/classes/form/competency_framework.php
index 6dde66c47f5..6d4b6bcd461 100644
--- a/admin/tool/lp/classes/form/competency_framework.php
+++ b/admin/tool/lp/classes/form/competency_framework.php
@@ -65,7 +65,7 @@ class competency_framework extends persistent {
$mform->setType('description', PARAM_RAW);
// ID number.
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
- $mform->setType('idnumber', PARAM_TEXT);
+ $mform->setType('idnumber', PARAM_RAW);
$mform->addRule('idnumber', null, 'required', null, 'client');
$mform->addRule('idnumber', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
diff --git a/admin/tool/lp/templates/competencies_move_tree.mustache b/admin/tool/lp/templates/competencies_move_tree.mustache
index 0a51aef65f8..d6ae8e6bca2 100644
--- a/admin/tool/lp/templates/competencies_move_tree.mustache
+++ b/admin/tool/lp/templates/competencies_move_tree.mustache
@@ -31,7 +31,7 @@
-
- {{framework.shortname}}
+ {{{framework.shortname}}}
{{#competencies}}
{{> tool_lp/competencies_tree }}
diff --git a/admin/tool/lp/templates/competencies_tree.mustache b/admin/tool/lp/templates/competencies_tree.mustache
index 5e30b8ad9d5..75c228218d4 100644
--- a/admin/tool/lp/templates/competencies_tree.mustache
+++ b/admin/tool/lp/templates/competencies_tree.mustache
@@ -1,12 +1,12 @@
-
{{#canmanage}}
- {{shortname}}
+ {{{shortname}}}
{{/canmanage}}
{{^canmanage}}
- {{shortname}}
+ {{{shortname}}}
{{/canmanage}}
{{#haschildren}}
diff --git a/admin/tool/lp/templates/competencies_tree_root.mustache b/admin/tool/lp/templates/competencies_tree_root.mustache
index c163870708a..d138fe177a2 100644
--- a/admin/tool/lp/templates/competencies_tree_root.mustache
+++ b/admin/tool/lp/templates/competencies_tree_root.mustache
@@ -1,5 +1,5 @@
- - {{shortname}}
+
- {{{shortname}}}
{{#competencies}}
{{> tool_lp/competencies_tree }}
diff --git a/admin/tool/lp/templates/competency_path.mustache b/admin/tool/lp/templates/competency_path.mustache
index 01e21c6bcb9..f756098b65f 100644
--- a/admin/tool/lp/templates/competency_path.mustache
+++ b/admin/tool/lp/templates/competency_path.mustache
@@ -39,10 +39,10 @@
}}