1742485595.FILE5_46-68-g5089651f.fix-openstreetmap-christoph-biedl.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Subject: Fix OpenStreetMap (Christoph Biedl)
  2. Origin: upstream, commit FILE5_46-68-g5089651f <https://github.com/file/file/commit/FILE5_46-68-g5089651f>
  3. Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Thu Mar 20 15:46:35 2025 +0000
  5. --- a/magic/Magdir/sgml
  6. +++ b/magic/Magdir/sgml
  7. @@ -15,7 +15,10 @@
  8. !:mime image/svg+xml
  9. !:ext svg
  10. +0 string/t \<?xml\ version=
  11. +!:strength +40
  12. >14 regex ['"\ \t]*[0-9.]+['"\ \t]*
  13. +
  14. # Sitemap file
  15. >>19 search/4096 \<urlset XML Sitemap document text
  16. !:mime application/xml-sitemap
  17. @@ -37,9 +40,7 @@
  18. # xhtml
  19. >19 search/4096/cWbt \<!doctype\ html XHTML document text
  20. >>15 string >\0 (version %.3s)
  21. -!:strength + 15
  22. !:mime application/xhtml+xml
  23. -
  24. >19 search/4096/cWbt \<html\ xmlns= XHTML document text
  25. >>15 string >\0 (version %.3s)
  26. !:mime application/xhtml+xml
  27. @@ -57,14 +58,11 @@
  28. # avoid misdetection as JavaScript
  29. 0 string/cWt \<!doctype\ html HTML document text
  30. !:mime text/html
  31. -!:strength + 30
  32. 0 string/ct \<html> HTML document text
  33. !:mime text/html
  34. -!:strength + 30
  35. 0 string/ct \<!--
  36. >&0 search/4096/cWt \<!doctype\ html HTML document text
  37. !:mime text/html
  38. -!:strength + 30
  39. >&0 search/4096/ct \<html> HTML document text
  40. !:mime text/html
  41. @@ -127,13 +125,21 @@
  42. 0 search/1/cwt \<?xml XML document text
  43. !:mime text/xml
  44. !:strength + 30
  45. +0 string/t \<?xml\ version\ " XML
  46. +!:mime text/xml
  47. +!:strength + 30
  48. 0 string/t \<?xml\ version=" XML
  49. !:mime text/xml
  50. !:strength + 30
  51. >15 string/t >\0 %.3s document text
  52. >>23 search/1 \<xsl:stylesheet (XSL stylesheet)
  53. >>24 search/1 \<xsl:stylesheet (XSL stylesheet)
  54. -
  55. +0 string/t \<?xml\ version=' XML
  56. +!:mime text/xml
  57. +!:strength + 30
  58. +>15 string/t >\0 %.3s document text
  59. +>>23 search/1 \<xsl:stylesheet (XSL stylesheet)
  60. +>>24 search/1 \<xsl:stylesheet (XSL stylesheet)
  61. 0 search/1/wt \<?XML broken XML document text
  62. !:mime text/xml
  63. !:strength - 10
  64. --- /dev/null
  65. +++ b/tests/osm.result
  66. @@ -0,0 +1 @@
  67. +OpenStreetMap XML data, ASCII text
  68. --- /dev/null
  69. +++ b/tests/osm.testfile
  70. @@ -0,0 +1,3 @@
  71. +<?xml version="1.0" encoding="UTF-8"?>
  72. +<osm version="0.6" generator="CGImap 0.0.2">
  73. +</osm>