<p>I've got a <a href="http://notebooks.readerville.com/" rel="noreferrer">site</a> that provides blog-friendly widgets via JavaScript. These work fine in most circumstances, including self-hosted Wordpress blogs. With blogs hosted at Wordpress.com, however, JavaScript isn't allowed in sidebar text modules. Has anyone seen a workaround for this limitation?</p>

[{'answer_id': 81505, 'author': 'matt lohkamp', 'author_id': 14026, 'author_profile': 'https://Stackoverflow.com/users/14026', 'pm_score': 4, 'selected': True, 'text': '<p>you could always petition wp to add your widget to their \'approved\' list, but who knows how long that would take. you\'re talking about a way to circumvent the rules they have in place about posting arbitrary script. myspace javascript exploits in particular have increased awareness of the possibility of such workarounds, so you might have a tough time getting around the restrictions - however, here\'s a classic ones to try:</p>\n\n<p>put the javascript in a weird place, like anywhere that executes a URL. for instance:</p>\n\n<pre><code>&lt;div style="background:url(\'javascript:alert(this);\');" /&gt;\n</code></pre>\n\n<p>sometimes the word \'javascript\' gets cut out, but occasionally you can sneak it through as java\\nscript, or something similar.</p>\n\n<p>sometimes quotes get stripped out - try String.fromCharCode(34) to get around that. Also, in general, using eval("codepart1" + "codepart2") to get around restricted words or characters.</p>\n\n<p>sneaking in javascript is a tricky business, mostly utilizing unorthodox (possibly un-documented) browser behavior in order to execute arbitrary javascript on a page. Welcome to hacking.</p>\n'}, {'answer_id': 89760, 'author': 'Devin Reams', 'author_id': 16248, 'author_profile': 'https://Stackoverflow.com/users/16248', 'pm_score': 3, 'selected': False, 'text': '<p>From the official <a href="http://faq.wordpress.com/2006/05/07/javascript-can-i-use-that-on-my-blog/" rel="nofollow noreferrer">WordPress.com FAQ</a>:</p>\n\n<blockquote>\n  <p>Javascript can be used for malicious purposes and while what you want to do is okay it does not mean all javascript will be okay.</p>\n</blockquote>\n\n<p>It goes on to remind the reader that both MySpace and LiveJournal had been affected by malicious Javascript and, therefore, will not be permitted (as it may be exploited by users with poor intentions). They can\'t risk it with amazingly large sites (think I Can Has Cheezburger, Anderson Cooper 360, Fox, etc.).</p>\n\n<p>If you think you have Javascript that would benefit WordPress.com you can <a href="http://wordpress.com/contact-support/" rel="nofollow noreferrer">contact them directly</a>.</p>\n'}, {'answer_id': 2510303, 'author': 'MLCWO', 'author_id': 301092, 'author_profile': 'https://Stackoverflow.com/users/301092', 'pm_score': 1, 'selected': False, 'text': '<p>There is not work around for it. Wordpress does not currently support Javascript. Sorry.</p>\n'}, {'answer_id': 3501756, 'author': 'naugtur', 'author_id': 173077, 'author_profile': 'https://Stackoverflow.com/users/173077', 'pm_score': 0, 'selected': False, 'text': '<p>Just find a good site about XSS if You really need that js to work. But if it works for You it works for anybody, and You post a tutorian on how to do an XSS attack on Your page with posts or comments. </p>\n\n<p>reference:\n<a href="http://ha.ckers.org/xss.html" rel="nofollow noreferrer">http://ha.ckers.org/xss.html</a></p>\n'}]
['https://Stackoverflow.com/questions/81410', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6478/']