PDA

View Full Version : how can I prevent images or iframes getting displayed on EditorGrid with extjs 3.4?



nev
22 Oct 2012, 7:49 PM
Hi, I am using extjs 3.4 and have an EditorGrid and when I enter the following in any cell in EditorGrid, image or iframe gets displayed.
<iframe src='www.google.com' />
<img src="www.google.com" />

how can I prevent image or iframes getting displayed in the cell?

danguba
22 Oct 2012, 11:31 PM
You could add following render to a column
renderer: function(value, meta, record){
return Ext.util.Format.htmlEncode(value)
}

nev
23 Oct 2012, 11:28 AM
It worked :) Thanks a lot!

danguba
23 Oct 2012, 12:48 PM
Anytime