diff --git a/javascript/atoms/dom.js b/javascript/atoms/dom.js
index 6a46cff410fe5..1f521f06a99a5 100644
--- a/javascript/atoms/dom.js
+++ b/javascript/atoms/dom.js
@@ -1173,7 +1173,7 @@ bot.dom.appendVisibleTextLinesFromTextNode_ = function(textNode, lines,
if (textTransform == 'capitalize') {
// the unicode regex ending with /gu does not work in IE
- var re = goog.userAgent.IE ? /(^|\s|\b)(\S)/g : /(^|[^\d\p{L}\p{S}])([\p{Ll}|\p{S}])/gu;
+ var re = goog.userAgent.IE ? /(^|\s|\b)(\S)/g : /(^|\s|\b)(\S)/gu;
text = text.replace(re, function() {
return arguments[1] + arguments[2].toUpperCase();
});
diff --git a/javascript/atoms/test/text_test.html b/javascript/atoms/test/text_test.html
index 14f40c53b4d59..5620902711039 100644
--- a/javascript/atoms/test/text_test.html
+++ b/javascript/atoms/test/text_test.html
@@ -280,6 +280,8 @@
assertEquals('(This) “Is” [A] –Short– -Test- «For» *The* _Css_ ¿Capitalize? ?¡Transfor', text);
text = getVisibleTextByElementId("capitalized-8");
assertEquals('The Dutch Word: "Ijsland" Starts With A Digraph', text);
+ text = getVisibleTextByElementId("capitalized-9");
+ assertEquals('Test_text', text);
}
function getVisibleTextByElementId(id) {
@@ -430,6 +432,7 @@
ⓐⓑⓒ (ⓓⓔⓕ) —ⓖⓗⓘ— ⓙkl
(this) “is” [a] –short– -test- «for» *the* _css_ ¿capitalize? ?¡transfor
The Dutch word: "ijsland" starts with a digraph
+ test_text