Ask HN: How to allow users to add Adsense code without security risks

3 points by shafqat ↗ HN
What's the best way to allow users on your site to add Adsense code (javascript code) while still maintaining some sort of site security.

In other words, if we allow users to add javascript, how do we prevent from putting any and all sorts of code, including things that are unsafe or generally unwanted.

2 comments

[ 3.3 ms ] story [ 15.1 ms ] thread
The old adsense code simply required publisher id. Not sure how to get around that for new ones.
You can still use the old ones. They just don't go out of their way to advertise them, so to speak.