Giter Club home page Giter Club logo

Comments (5)

emptyflask avatar emptyflask commented on July 21, 2024

I don't think this matters much in practice, it seems like most clients are able to handle it.

from panko_serializer.

yosiat avatar yosiat commented on July 21, 2024

Hi @emptyflask !

Sorry for not getting in touch about this PR!

Some questions before I can dig in, I assume you serialize ActiveRecord objects:

  • Which version of Rails and Ruby are you using?
  • Which DB provider? MySQL / PostgreSQL / SQLite ?
  • What's the value stored in DB? <p>&nbsp;</p> ?

from panko_serializer.

yosiat avatar yosiat commented on July 21, 2024

@emptyflask hi! can you give any answers to the questions I asked? I think this is a quick one to fix, just need your input here so I can reproduce it correctly.

from panko_serializer.

emptyflask avatar emptyflask commented on July 21, 2024

Oh, sorry, I got buried with other stuff and forgot to respond to this.

I will have to do some testing again, but I believe this was with Rails 5.x and PostgreSQL, and &nbsp; being the text in question stored in the db.

from panko_serializer.

emptyflask avatar emptyflask commented on July 21, 2024

Ruby 2.6.3
Rails 6.0 (in this case I don't think it matters)

class FooSerializer < Panko::Serializer
  attributes :body
end

FooSerializer.new.serialize(Struct.new(:body).new("<p>&nbsp;</p>")).to_json
# => {"body":"\u003cp\u003e\u0026nbsp;\u003c/p\u003e"}

from panko_serializer.

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.