Author Topic: retrieve raw (non-HTML escaped) text after cellsave?  (Read 5127 times)

argo

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 33
    • View Profile
retrieve raw (non-HTML escaped) text after cellsave?
« on: August 21, 2013, 08:06:50 pm »
I'm checking row values after the cellsave event and, if required, submitting them to the server to be updated. My pqgrid data comes from a json dataset loaded from the server when initialized. Here's an example of how I'm retrieving the updated data in the cellsave event:

var myUpdatedValue = ui.data[rowIndx].myProperty;

The problem is that the value returned from ui.data is the HTML escaped content. For example, if someone types an ampersand it come back as "&" rather than &. How can I retrieve the unescaped content of the cell?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: retrieve raw (non-HTML escaped) text after cellsave?
« Reply #1 on: August 22, 2013, 10:16:29 am »
pqGrid doesn't modify the data in any way, this might be due to default contenteditable editor in the grid.

Either you can unescape the content yourself

I found a link after a bit of googling http://stackoverflow.com/questions/3700326/decode-amp-back-to-in-javascript

or you can use custom editor i.e. input textbox or textarea.