[OSM-dev] Changeset files (was Removing Minutely and Hourly Changesets)

Ævar Arnfjörð Bjarmason avarab at gmail.com
Mon Dec 21 12:06:37 GMT 2009


On Mon, Dec 21, 2009 at 11:44, Jon Burgess <jburgess777 at googlemail.com> wrote:
> On Mon, 2009-12-21 at 01:08 -0500, Anthony wrote:
>> Cool.  If anyone familiar with the planet dumper tool is listening...
>>
>> In
>> http://svn.openstreetmap.org/applications/utils/planet.osm/C/output_osm.c
>>
>> } else if ((*in >= 0) && (*in < 32)) {
>>             escape_tmp[len] = '?';
>>             len++;
>>
>> should be something like
>>
>> } else if ((*in > 0) && (*in < 32)) {
>>             len+=sprintf(&escape_tmp[len], "&#%d;", *in);
>>
>> "Something like" as in I haven't even checked if that compiles :).
>
> Most of the control characters are not allowed in a valid XML file. It
> makes no difference whether they are present as an ASCII character or as
> the equivalent entity.
>
> $ echo "<foo></foo>" | xmllint -format -
> -:1: parser error : xmlParseCharRef: invalid xmlChar value 1
> <foo></foo>

Indeed. These were all created by Potlatch while it still wasn't doing
proper input validation (http://trac.openstreetmap.org/ticket/2072).

Would anything break if these values were just cleaned up in the
database so we don't have to deal with them in other tools in the
future?




More information about the dev mailing list