<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer" nil="true"></assigned-user-id>
  <attachments-count type="integer">1</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2009-06-29T09:38:29+01:00</created-at>
  <creator-id type="integer">17407</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer">9903</milestone-id>
  <number type="integer">2850</number>
  <permalink>simplify-regex-for-filtering-non-ascii-chars-in-json-escape</permalink>
  <priority type="integer">1943</priority>
  <project-id type="integer">8994</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>invalid</state>
  <tag>2.3.x 3.0 active_support encoding escape json regexp</tag>
  <title>Simplify regex for filtering non-ASCII chars in JSON escape</title>
  <updated-at type="datetime">2009-07-02T00:25:14+01:00</updated-at>
  <user-id type="integer">12714</user-id>
  <user-name>Yehuda Katz (wycats)</user-name>
  <creator-name>Akira Matsuda</creator-name>
  <url>http://rails.lighthouseapp.com/projects/8994/tickets/2850</url>
  <milestone-title>2.x</milestone-title>
  <original-body>A regex in JSON escape seems to be too much complex. I even can't see whether it works as expected.

Attached a patch to simply filter out the non-ASCII chars.

Please ignore this patch if I misunderstood the spec, but it seems that the tests passes anyway.</original-body>
  <latest-body>A regex in JSON escape seems to be too much complex. I even can't see whether it works as expected.

Attached a patch to simply filter out the non-ASCII chars.

Please ignore this patch if I misunderstood the spec, but it seems that the tests passes anyway.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;A regex in JSON escape seems to be too much complex. I even
can't see whether it works as expected.&lt;/p&gt;
&lt;p&gt;Attached a patch to simply filter out the non-ASCII chars.&lt;/p&gt;
&lt;p&gt;Please ignore this patch if I misunderstood the spec, but it
seems that the tests passes anyway.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>A regex in JSON escape seems to be too much complex. I even can't see whether it works as expected.

Attached a patch to simply filter out the non-ASCII chars.

Please ignore this patch if I misunderstood the spec, but it seems that the tests passes anyway.</body>
      <body-html>&lt;div&gt;&lt;p&gt;A regex in JSON escape seems to be too much complex. I even
can't see whether it works as expected.&lt;/p&gt;
&lt;p&gt;Attached a patch to simply filter out the non-ASCII chars.&lt;/p&gt;
&lt;p&gt;Please ignore this patch if I misunderstood the spec, but it
seems that the tests passes anyway.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-06-29T09:38:29+01:00</created-at>
      <creator-id type="integer">17407</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2850</number>
      <permalink>simplify-regex-for-filtering-non-ascii-chars-in-json-escape</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2.3.x 3.0 active_support encoding escape json regexp</tag>
      <title>Simplify regex for filtering non-ASCII chars in JSON escape</title>
      <updated-at type="datetime">2009-06-29T09:38:32+01:00</updated-at>
      <user-id type="integer">17407</user-id>
      <user-name>Akira Matsuda</user-name>
      <creator-name>Akira Matsuda</creator-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2850</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>It looks like the original regex was there for a reason. Do you have any reason to believe it's just arbitrary?</body>
      <body-html>&lt;div&gt;&lt;p&gt;It looks like the original regex was there for a reason. Do you
have any reason to believe it's just arbitrary?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-02T00:25:11+01:00</created-at>
      <creator-id type="integer">17407</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2850</number>
      <permalink>simplify-regex-for-filtering-non-ascii-chars-in-json-escape</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>invalid</state>
      <tag>2.3.x 3.0 active_support encoding escape json regexp</tag>
      <title>Simplify regex for filtering non-ASCII chars in JSON escape</title>
      <updated-at type="datetime">2009-07-02T00:25:14+01:00</updated-at>
      <user-id type="integer">12714</user-id>
      <user-name>Yehuda Katz (wycats)</user-name>
      <creator-name>Akira Matsuda</creator-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2850</url>
      <milestone-title>2.x</milestone-title>
    </version>
  </versions>
  <attachments type="array">
    <attachment type="Attachment">
      <code>caba84b9208fc008af4868eefc63dccf586e7752</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2009-06-29T09:38:29+01:00</created-at>
      <filename>json_escape_regex_fix.diff</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">138547</id>
      <size type="integer">1152</size>
      <uploader-id type="integer">17407</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/138547/json_escape_regex_fix.diff</url>
    </attachment>
  </attachments>
</ticket>
