diff --git a/lib/ace/mode/html_highlight_rules.js b/lib/ace/mode/html_highlight_rules.js
index 6d2221e3..24165fc2 100644
--- a/lib/ace/mode/html_highlight_rules.js
+++ b/lib/ace/mode/html_highlight_rules.js
@@ -62,6 +62,9 @@ var HtmlHighlightRules = function() {
merge : true,
regex : "<\\!--",
next : "comment"
+ }, {
+ token : "xml_pe",
+ regex : "<\\!.*?>"
}, {
token : "meta.tag",
regex : "<(?=\s*script\\b)",
@@ -77,6 +80,9 @@ var HtmlHighlightRules = function() {
}, {
token : "text",
regex : "\\s+"
+ }, {
+ token : "constant.character.entity",
+ regex : "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
}, {
token : "text",
regex : "[^<]+"
diff --git a/lib/ace/mode/xml_highlight_rules.js b/lib/ace/mode/xml_highlight_rules.js
index 12cfd7b3..42938b90 100644
--- a/lib/ace/mode/xml_highlight_rules.js
+++ b/lib/ace/mode/xml_highlight_rules.js
@@ -59,6 +59,9 @@ var XmlHighlightRules = function() {
merge : true,
regex : "<\\!--",
next : "comment"
+ }, {
+ token : "xml_pe",
+ regex : "<\\!.*?>"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@@ -66,6 +69,9 @@ var XmlHighlightRules = function() {
}, {
token : "text",
regex : "\\s+"
+ }, {
+ token : "constant.character.entity",
+ regex : "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
}, {
token : "text",
regex : "[^<]+"
diff --git a/lib/ace/mode/xml_util.js b/lib/ace/mode/xml_util.js
index 63e6b1b7..b58df44f 100644
--- a/lib/ace/mode/xml_util.js
+++ b/lib/ace/mode/xml_util.js
@@ -112,7 +112,7 @@ exports.tag = function(states, name, nextState) {
}
},
merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
+ regex : "[-_a-zA-Z0-9:]+",
next : name + "_embed_attribute_list"
}, {
token: "empty",