1diff --git c/arelle/CntlrProfiler.py i/arelle/CntlrProfiler.py
2index a64bb1b..dc0299d 100644
3--- c/arelle/CntlrProfiler.py
4+++ i/arelle/CntlrProfiler.py
5@@ -1,5 +1,6 @@
6
7-import Cntlr, ModelManager, FileSource, time
8+from arelle import Cntlr, ModelManager, FileSource
9+import time
10 from optparse import OptionParser
11 import cProfile
12 import gettext
13diff --git c/arelle/ValidateFilingText.py i/arelle/ValidateFilingText.py
14index 12dbbbb..c0e98c3 100644
15--- c/arelle/ValidateFilingText.py
16+++ i/arelle/ValidateFilingText.py
17@@ -16,7 +16,7 @@ XMLdeclaration = re.compile(r"<\?xml.*\?>", re.DOTALL)
18 XMLpattern = re.compile(r".*(<|<|<|<)[A-Za-z_]+[A-Za-z0-9_:]*[^>]*(/>|>|>|/>).*", re.DOTALL)
19 CDATApattern = re.compile(r"<!\[CDATA\[(.+)\]\]")
20 #EFM table 5-1 and all &xxx; patterns
21-docCheckPattern = re.compile(r"&\w+;|[^0-9A-Za-z`~!@#$%&\*\(\)\.\-+ \[\]\{\}\|\\:;\"'<>,_?/=\t\n\r\m\f]") # won't match &#nnn;
22+docCheckPattern = re.compile(r"&\w+;|[^0-9A-Za-z`~!@#$%&\*\(\)\.\-+ \[\]\{\}\|\\:;\"'<>,_?/=\t\n\r\f]") # won't match &#nnn;
23 namedEntityPattern = re.compile("&[_A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]"
24 r"[_\-\.:"
25 "\xB7A-Za-z0-9\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u0300-\u036F\u203F-\u2040]*;")
26@@ -904,4 +904,4 @@ def referencedFiles(modelXbrl, localFilesOnly=True):
27 # footnote or other elements
28 for elt in modelXbrl.modelDocument.xmlRootElement.iter("{http://www.w3.org/1999/xhtml}a", "{http://www.w3.org/1999/xhtml}img"):
29 addReferencedFile(elt, elt)
30- return referencedFiles
31\ No newline at end of file
32+ return referencedFiles