Fighting fires: Solving an embed problem
by Marc

If you have access to the source code of your blog, you should be able to embed Urtak on your page.
However, some publishing services, even though they let you write code to your page, run the code through what is called an HTML validator, which makes sure that everything added conforms to that platform’s standards.
We came across this problem because an Urtak creator wrote to us and let us know that he couldn’t embed Urtak onto his Wikispaces page. The problem was that the HTML validator (an xhtml 1.0 validator in this case) changed the Urtak embed code and made it unusable.
But with just a small adjustment to the embed code, we can get around those pesky validators.
So the embed code that you get on Urtak.com looks like this:
<script src="http://assets.urtak.com/javascripts/widget.js" type="text/javascript"></script> <a data-urtak-widget-key="613854c097172d795853a9c536f550ce" href="http://urtak.com/u/urtak" style="display:none"/>the general interest urtak</a>
For it to work with the validators, it needs to look like this:
<script src="http://assets.urtak.com/javascripts/widget.js" type="text/javascript"></script>
<script type="text/javascript">
document.write('<a data-urtak-widget-key="613854c097172d795853a9c536f550ce" href="http://urtak.com/u/urtak">the general interest urtak</a>');
</script>
It’s basically the same except the … part is wrapped in:
<script type="text/javascript">
document.write(' ... ');
</script>
Make sure the document.write bracket has single quotes, not double quotes.
That should do it! A bit tricky, but problem solved. Curse you HTML validators!






