powerpoint
powerpoint copied to clipboard
PPTX files are corrupted when XML special characters are used
Hi, we are using this gem in a project and noticed that some .pptx files were corrupted, then I found that is because text is not XML escaped. Quick and easy steps to reproduce it:
require 'powerpoint'
@deck = Powerpoint::Presentation.new
@deck.add_textual_slide 'A&B', ['test']
@deck.save('test.pptx')
Of course there's an easy workaround: escape text before adding it to the slides. But I think that it should be fixed or included in the README.md as a known issue.
my two cents.
use REMXL from ruby to escape text basically, REXML::Text.new('your string', false, nil, false)