{"id":19023629,"date":"2026-09-18T16:07:05","date_gmt":"2026-09-18T16:07:05","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/bug-javascript-execution-error\/"},"modified":"2026-09-18T16:08:59","modified_gmt":"2026-09-18T16:08:59","slug":"bug-javascript-execution-error","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/bug-javascript-execution-error\/","title":{"rendered":"Bug: Javascript Execution Error"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">There is a javascript execution error related to <em>$selector_js <\/em>and <em>$title_js<\/em> in <em>hpt_hptheadinsert()<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example: &#8220;echo esc_js( $title_js )&#8221; emits quotes as &#8220;&amp;quot;Page Title&amp;quot;&#8221; which results in invalid javascript when assigning a value to <em>var titleText<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Emitting <em>$title_js<\/em> without a call to <em>esc_js()<\/em> results in valid javascript.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tested only with Firefox.<\/p>\n","protected":false},"template":"","class_list":["post-19023629","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19023629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19023629\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19023629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}