<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="https://uname.pingveno.net/blog/index.php/feed/rss2/xslt" ?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title># uname -a - Mot-clé - xml</title>
    <link>https://uname.pingveno.net/blog/index.php/</link>
    <atom:link href="https://uname.pingveno.net/blog/index.php/feed/tag/xml/rss2" rel="self" type="application/rss+xml" />
    <description>Le blog de uname.pingveno.net</description>
    <language>fr</language>
    <pubDate>Tue, 18 Aug 2026 13:46:21 +0200</pubDate>
    <copyright>Mathieu Pellegrin</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>Dotclear</generator>
          <item>
        <title>Getsimple : exotic char causes website crash</title>
        <link>https://uname.pingveno.net/blog/index.php/post/2013/03/15/Getsimple-%3A-exotic-char-cause-website-crash</link>
        <guid isPermaLink="false">urn:md5:c0bea23da158aaa0e1eaf74082c3d11f</guid>
        <pubDate>Fri, 15 Mar 2013 08:29:00 +0100</pubDate>
        <dc:creator>Mathieu</dc:creator>
                  <category>Hacks</category>
                          <category>bug</category>
                  <category>GetSimple</category>
                  <category>informatique</category>
                  <category>xml</category>
                <description>          Input sanitizing while editing pages is not efficient in GetSimple, incorrect char such as NULL or EOT corrupt XML files and crashes the CMS&amp;#160;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Warning: simplexml_load_string(): Entity: line 106: parser error : CData section not finished &lt;/pre&gt;&lt;br /&gt;Here is a patch&amp;#160;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;--- admin/inc/basic.php
+++ admin/inc/basic.php
@@ -654,8 +654,15 @@
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $text = htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
-&amp;nbsp;&amp;nbsp;&amp;nbsp; $text = str_replace(chr(12), '', $text);
-&amp;nbsp;&amp;nbsp;&amp;nbsp; $text = str_replace(chr(3), ' ', $text);
+&amp;nbsp;&amp;nbsp;&amp;nbsp; $badchars = array();
+&amp;nbsp;&amp;nbsp;&amp;nbsp; for ($code = 0; $code &amp;lt; 32; $code++) {
+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $badchars[] = chr($code);
+&amp;nbsp;&amp;nbsp;&amp;nbsp; }
+&amp;nbsp;&amp;nbsp;&amp;nbsp; unset($badchars[13]);
+&amp;nbsp;&amp;nbsp;&amp;nbsp; unset($badchars[10]);
+&amp;nbsp;&amp;nbsp;&amp;nbsp; $text = str_replace($badchars, '', $text);
+&amp;nbsp;&amp;nbsp;&amp;nbsp; //$text = str_replace(chr(12), '', $text);
+&amp;nbsp;&amp;nbsp;&amp;nbsp; //$text = str_replace(chr(3), ' ', $text);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $text;
&amp;nbsp;}&lt;/pre&gt;Note that it does not fixes the corrupted XML files, it prevents the corrupted files to appear.&lt;br /&gt;</description>
        
              </item>
      </channel>
</rss>
