Giter VIP home page Giter VIP logo

Comments (9)

randym avatar randym commented on July 17, 2024

You cannot use &, <, or > in xml. - they must be character entities.

I don't think it should be the responsibility of the gem to try and guess when "&" is supposed to be converted to &amp;

from axlsx.

jurriaan avatar jurriaan commented on July 17, 2024

I think it axlsx should convert them to entities, in excel I don't have to worry about entities or xml. Why should I have to when I use axlsx ;). It did convert them before those performance tweaks.

from axlsx.

randym avatar randym commented on July 17, 2024

Care to take this one on? I am a little bit worried about the performance hit of checking the content of every non-formula string cell to ensure that it does not contain invalid XML characters.

from axlsx.

jurriaan avatar jurriaan commented on July 17, 2024

On my system escaping is 19% slower.. But IMHO it must not be possible to generate invalid documents using axlsx.
:)

from axlsx.

randym avatar randym commented on July 17, 2024

What kind of mechanism are you using?

from axlsx.

jurriaan avatar jurriaan commented on July 17, 2024

I tried fast_xs and CGI.escapeHTML using a simple collect before calling add_row

from axlsx.

randym avatar randym commented on July 17, 2024

hmmm we are going to have to eat this somewhere. Looking at the fastest option (replacing in worksheet.to_xml_string) is complicated - seems it should happen when the cell is created. (as you have done with add_row) Do you know a way to hit libxml directly? (again my ignorance shines through...)

feeling parenthetical it seems...

from axlsx.

randym avatar randym commented on July 17, 2024

fixed on master and will be released with 1.1.0
I used CGI in Cell.cast_value as it only applies to strings and need to be hit when people edit the value of the cell directly.

from axlsx.

jurriaan avatar jurriaan commented on July 17, 2024

👍

from axlsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.