extensions.st
branchjv
changeset 17217 fdcba4359aff
parent 17215 4a42de8e888a
parent 17174 c79ff7f30185
child 17219 46a5890e4c57
--- a/extensions.st	Tue Dec 20 10:11:45 2016 +0000
+++ b/extensions.st	Thu Dec 22 23:11:18 2016 +0000
@@ -511,9 +511,12 @@
 !CharacterArray methodsFor:'inspecting'!
 
 inspector2TabHTML
-    "/ use smalltalk at, to prevent HTMLDocumentView becoming a prereq of libbasic
+    |lcString|
+    
+    "/ use Smalltalk >> at:, to prevent HTMLDocumentView becoming a prereq of libbasic
     (Smalltalk at:#HTMLDocumentView) notNil ifTrue:[
-        ((self startsWith:'<!!DOCTYPE html') or:[ (self startsWith:'<html>') ]) ifTrue:[
+        lcString := self asLowercase.
+        ((lcString startsWith:'<!!doctype html' ) or:[ (lcString startsWith:'<html>') ]) ifTrue:[
             ^self newInspector2Tab
                 label: 'HTML';
                 priority: 35;
@@ -521,7 +524,7 @@
                 yourself
         ].
     ].
-    "/ If nil is returned, tab is not shown...
+    "/ If nil is returned, the HTML tab is not shown...
     ^ nil
 
     "Created: / 17-02-2008 / 10:10:50 / janfrog"
@@ -553,7 +556,7 @@
 
     |tabClass tab sub xmlInspectorClass xmlParserClass|
 
-    (self startsWith:'<?xml') ifFalse:[^ nil].
+    (self asLowercase startsWith:'<?xml') ifFalse:[^ nil].
     
     "return an extra XML-dom tab to be used inside an inspector"