Menu

#8 Editing widget html

open
nobody
None
5
2012-01-07
2012-01-07
Anonymous
No

I just fresh installed wp with wp abstraction SQL, in the standard wp theme "twenty eleven" I went into "appearance"->widgets and created a new text/html widget. I added a <img> tag to the widget body and it didn't save anything. I checked the sql profiler to see what was wrong and found out there's a single quoted 'option_name' in the where clause generating a SQL error.

UPDATE wp_options SET option_value = N'a:3:{i:2;a:3:{s:5:"title";s:17:"La zona di Milano";s:4:"text";s:424:"<img src="http://maps.googleapis.com/maps/api/staticmap?center=via+laghetto,Milano,Italia&zoom=12&size=200x200&maptype=roadmap&path=color:0xFF0000FF|weight:3|fillcolor:0x44993344|\via+verbano,Milano,Italia|viale+tibaldi,Milano,Italia|\porta+genova,Milano,Italia|\porta+romana,milano,italia|\viale+luigi+majno,milano,italia|\viale+abruzzi,milano,italia|\corso+22+marzo,milano,italia|\via+verbano,Milano,Italia&sensor=false"/>";s:6:"filter";b:1;}i:3;a:3:{s:5:"title";s:0:"";s:4:"text";s:0:"";s:6:"filter";b:0;}s:12:"_multiwidget";i:1;}' WHERE `option_name` = N'widget_text'

Discussion


Log in to post a comment.