fix for #120 and #220

#220 Double encoding.
#120 InPlaceEditBehavior broken