Bug 11259

Summary: New entries for text/html magic
Product: shared-mime-info Reporter: David Faure <faure>
Component: freedesktop.org.xmlAssignee: Jonathan Blandford <jrb>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: better patch

Description David Faure 2007-06-13 14:39:42 UTC
"<script>foo</script>" needs to be recognized as text/html  (KDE bug 61483).

Here's a patch to add that. It removes the entries for TITLE and title because there is already an entry a few lines above, which has 0:64 as offset, so those lines with only "0" as offset are redundant.

diff -u -p -r1.246 freedesktop.org.xml.in
--- freedesktop.org.xml.in      1 Jun 2007 15:27:01 -0000       1.246
+++ freedesktop.org.xml.in      13 Jun 2007 21:33:25 -0000
@@ -3378,8 +3378,8 @@ command to generate the output files.
       <match type="string" value="&lt;HTML" offset="0:64"/>
       <match type="string" value="&lt;BODY" offset="0"/>
       <match type="string" value="&lt;body" offset="0"/>
-      <match type="string" value="&lt;TITLE" offset="0"/>
-      <match type="string" value="&lt;title" offset="0"/>
+      <match type="string" value="&lt;SCRIPT" offset="0"/>
+      <match type="string" value="&lt;script" offset="0"/>
       <match type="string" value="&lt;!--" offset="0"/>
       <match type="string" value="&lt;h1" offset="0"/>
       <match type="string" value="&lt;H1" offset="0"/>
Comment 1 David Faure 2007-06-13 14:44:37 UTC
Created attachment 10301 [details] [review]
better patch

Doh, I meant to use a range instead. Let's also put uppercase first lowercase second in all those range entries for good order.
Comment 2 Christian - Manny Calavera - Neumair 2007-06-13 15:06:10 UTC
Committed, thanks. Closing.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.