Opened 5 years ago

Closed 5 years ago

#17 closed defect (fixed)

Ampersand character not showing up properly

Reported by: raanan Owned by: daniloercoli
Priority: minor Milestone:
Component: Blog Setup Version:
Keywords: Cc: dercoli@…

Description

One of the blogs I was testing with has a "&" in the blog title. In the app that shows up as "&" in the various screens.

Change History (8)

comment:1 Changed 5 years ago by daniloercoli

  • Cc dercoli@… added
  • Owner set to daniloercoli
  • Status changed from new to accepted

I've set the title of testing blog to WP & BB " (url:http://testing.mopress.danais.org credential:editore/cancello)

I've modified the php class class-IXR.php to logging the xmlrpc on output.
Here the response:

<?xml version="1.0"?>
<methodResponse>

<params>

<param>

<value>

<array><data>

<value><struct>
<member><name>isAdmin</name><value><boolean>0</boolean></value></member>
<member><name>url</name><value><string>http://testing.mopress.danais.org/</string></value></member>
<member><name>blogid</name><value><string>1</string></value></member>
<member><name>blogName</name><value><string>WP &amp;amp; BB &quot; </string></value></member>
<member><name>xmlrpc</name><value><string>http://testing.mopress.danais.org/xmlrpc.php</string></value></member>

</struct></value>
</data></array>

</value>

</param>

</params>

</methodResponse>

as we can see from the response, we got the first html-entity malformed....

btw, the Http response header doesn't include Content-Encoding field. we assume UTF-8?

comment:2 Changed 5 years ago by daniloercoli

I've patched the bug in the latest version present in trunk. I'm investigating on a better and clean solution.

comment:3 Changed 5 years ago by daniloercoli

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in the latest version of SVN code.

comment:4 Changed 5 years ago by raanan

seeing a similar issue with the "On" field in comments.

comment:5 Changed 5 years ago by raanan

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:6 Changed 5 years ago by daniloercoli

Patched the issue in the latest version present in trunk.
we have a string replacement for double encoded Ampersand:

&amp;#038; -> &#038;
&amp;amp; -> &amp;

Seems that other html entities are correctly encoded by WP.

comment:7 Changed 5 years ago by daepunt

The name of my weblog is:
dae's weblog
which is displayed as: dae&#039;s weblog
WordPress for iPhone displays it correctly (but WordPress for BlackBerry doesn't)...

comment:8 Changed 5 years ago by daniloercoli

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in the last SVN code. (rev127)

Note: See TracTickets for help on using tickets.