Skip to content

Preview should be javascript-sandboxed #10

scor opened this Issue May 21, 2012 · 4 comments

2 participants

RDFa Community Group member
scor commented May 21, 2012

While trying some HTML from Drupal in Play, I found it sometimes doesn't return the expected triples. I've isolated the bug to be coming from a script element in <head>. To reproduce, try the following snippet in Play and note that no triples are generated for the RDFa inside body (while pyRDFa and Gregg's distiller do generated the expected triples).

<!DOCTYPE html>
  <script type="text/javascript" src=""></script>
  <span vocab="" typeof="Document">
    <a property="url" href="">
      <span property="title">RDFa 1.1 Primer</span></a>.

Grrr... OK. Those links had angle brackets around them but github interpreted them as links.


I see triples now in Chrome. The URI redirects to an HTML page and there is an exception from syntax errors while processing that page as Javascript. It may be that different browser/os combinations stop execution due to that exception.

@scor scor added a commit that referenced this issue Jan 22, 2013
@scor scor Fix issue #10: sandbox the preview iframe so that its javascript does…
… not conflict with parent window javascript
RDFa Community Group member
scor commented Jan 22, 2013

fixed and deployed

@scor scor closed this Jan 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.