open-contracting-archive / standard-collaborator

Superseded by open-contracting/standard
https://github.com/open-contracting/standard
1 stars 3 forks source link

Script tag being stripped out #18

Closed practicalparticipation closed 9 years ago

practicalparticipation commented 9 years ago

The script tag for docson is being stripped out.

I suspect this is to do with the data-schema element on it, which might conflict with the approach taken for the other embedded examples pre-processing:

foobacca commented 9 years ago

Assuming this is the same as the email you sent last night (about the script tags in this file, then this is due to the django template syntax in the file not playing well with a library called PyQuery that I use to extract the table of contents and insert the json and HTML table.

If you replaced the django template bits with actual lnks I think it will work OK. So you could replace the contents of the file with:

<div class="schema-holder">
<script src="../../../../../static/docson/widget.js" data-schema="../../../release-package-schema.json"></script>
</div>

And I would then expect it to work. And by using relative links it keeps it reasonably safe against future changes to the underlying URL structure.

It would be nice to keep the django template syntax, but the stuff seems to be changed at a relatively low level and I haven't so far found an avenue that seems likely to allow django template syntax to be passed through.

practicalparticipation commented 9 years ago

Ok - happy to work with the relative links. Will update on that basis.

practicalparticipation commented 9 years ago

Ok - I've been trying at http://ocds.stage.aptivate.org/standard/r/master/en/schema/release/ but docson doesn't appear to like the relative links.

Have you got this working in a test?

foobacca commented 9 years ago

This has been fixed, so closing the issue