I knew I had to be doing something stupid. <\/script> works great.
On Dec 7, 12:36 am, PhistucK <
phist...@gmail.com> wrote:
> You cannot have a "</script>" inside a JavaScript code within
> <script></script>. This is true for regular web pages and not only with
> Chrome. Add a backslash before the forward slash and it should disappear, I
> think (or use \XXX escapes for < and >).
>
>
>
>
>
>
>
>
> On Tue, Dec 7, 2010 at 01:30, jbasdf <
justinb...@gmail.com> wrote:
> > I have the following code inside a function in my background.html
> > page:
>
> > widgets['fb_comments'] = {'css_class': 'facebook', 'name': 'Facebook
> > Comments', 'code': '<div class="oerglue-widgets-widget"><div id="fb-
> > root"></div><{script} src="
http://connect.facebook.net/en_US/
> > all.js#appId=APP_ID&xfbml=1"></{script}><fb:comments xid="{id}"
> > numposts="10" width="425" publish_feed="true"></fb:comments></div>' };
>
> > With that code in place I get:
> > Uncaught SyntaxError: Unexpected token ILLEGAL
>
> > Just to be sure I tried it with a simpler script and got the same
> > error:
> > widgets['test'] = '<script></script>';
>
> > I thought that I could put anything inside a string that I wanted but
> > I'm guessing I missed something in the security documentation. Has
> > anyone seen this before?
>
> > Thanks,
> > Justin
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.