After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 543986 - gog_style_font_sax_save() writes unescaped font name
gog_style_font_sax_save() writes unescaped font name
Status: RESOLVED FIXED
Product: libgoffice
Classification: Other
Component: Graphing / Charting
unspecified
Other All
: Normal critical
: ---
Assigned To: Emmanuel Pacaud
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2008-07-21 13:03 UTC by sum1
Modified: 2008-07-21 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description sum1 2008-07-21 13:03:32 UTC
Version: r2153
OS: Ubuntu Hardy

Steps to reproduce:
- Run Gnumeric
- Insert > Chart
- Leave the XY plot selected and press the Forward button
- Select "X-Axis1"
- Select the Font tab
- Choose a font with an invalid XML character (I used one called m&ms)
- Press the Insert button
- Draw the chart on to the sheet
- File > Save
- Press the Save button


Exported XML:

<font color="0:0:0:FF" font="m&ms 8" auto-scale="1"/>


Backtrace:

Breakpoint 1, gog_style_font_sax_save (output=0x85bbc00, style=0x8582400) at gog-style.c:1608
1608		gsf_xml_out_add_cstr_unchecked (output, "font", str);
(gdb) p str
$5 = 0x85fe328 "m&ms 8"
(gdb) bt
  • #0 gog_style_font_sax_save
    at gog-style.c line 1608
  • #1 gog_style_persist_sax_save
    at gog-style.c line 1811
  • #2 gog_persist_sax_save
    at gog-object-xml.c line 71
  • #3 gog_object_write_property_sax
    at gog-object-xml.c line 203
  • #4 gog_object_write_xml_sax
    at gog-object-xml.c line 304
  • #5 gog_object_write_xml_sax
    at gog-object-xml.c line 315
  • #6 gog_object_write_xml_sax
    at gog-object-xml.c line 315
  • #7 gnm_sog_write_xml_sax
    at sheet-object-graph.c line 363
  • #8 xml_write_objects
    at xml-sax-write.c line 1094
  • #9 xml_write_sheet
    at xml-sax-write.c line 1167
  • #10 xml_write_sheets
    at xml-sax-write.c line 1186
  • #11 gnm_xml_file_save
    at xml-sax-write.c line 1297
  • #12 go_file_saver_save_real
    at file.c line 443
  • #13 go_file_saver_save
    at file.c line 705
  • #14 wbv_save_to_output
    at workbook-view.c line 846
  • #15 wbv_save_to_uri
    at workbook-view.c line 883
  • #16 wb_view_save_as
    at workbook-view.c line 919
  • #17 gui_file_save_as
    at gui-file.c line 542
  • #18 gui_file_save
    at gui-file.c line 575
  • #19 cb_file_save
    at wbc-gtk-actions.c line 91

Comment 1 Jean Bréfort 2008-07-21 14:16:58 UTC
Fixed both branches.