home / content / repos

repos: 184168864

This data as json

id node_id name full_name private owner html_url description fork created_at updated_at pushed_at homepage size stargazers_count watchers_count language has_issues has_projects has_downloads has_wiki has_pages forks_count archived disabled open_issues_count license topics forks open_issues watchers default_branch permissions temp_clone_token organization network_count subscribers_count readme readme_html allow_forking visibility is_template template_repository web_commit_signoff_required has_discussions
184168864 MDEwOlJlcG9zaXRvcnkxODQxNjg4NjQ= datasette-render-html simonw/datasette-render-html 0 9599 https://github.com/simonw/datasette-render-html Plugin for selectively rendering the HTML is specific columns 0 2019-04-30T01:21:25Z 2020-09-24T04:44:47Z 2021-03-17T03:57:13Z   8 2 2 Python 1 1 1 1 0 2 0 0 1   ["datasette", "datasette-plugin", "datasette-io"] 2 1 2 master {"admin": false, "push": false, "pull": false}     2 1 # datasette-render-html [![PyPI](https://img.shields.io/pypi/v/datasette-render-html.svg)](https://pypi.org/project/datasette-render-html/) [![CircleCI](https://circleci.com/gh/simonw/datasette-render-html.svg?style=svg)](https://circleci.com/gh/simonw/datasette-render-html) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-render-html/blob/master/LICENSE) This Datasette plugin lets you configure Datasette to render specific columns as HTML in the table and row interfaces. This means you can store HTML in those columns and have it rendered as such on those pages. If you have a database called `docs.db` containing a `glossary` table and you want the `definition` column in that table to be rendered as HTML, you would use a `metadata.json` file that looks like this: { "databases": { "docs": { "tables": { "glossary": { "plugins": { "datasette-render-html": { "columns": ["definition"] } } } } } } } ## Security This plugin allows HTML to be rendered exactly as it is stored in the database. As such, you should be sure only to use this against columns with content that you trust - otherwise you could open yourself up to an [XSS attack](https://owasp.org/www-community/attacks/xss/). It's possible to configure this plugin to apply to columns with specific names across whole databases or the full Datasette instance, but doing so is not safe. It could open you up to XSS vulnerabilities where an attacker composes a SQL query that results in a column containing unsafe HTML. As such, you should only use this plugin against specific columns in specific tables, as shown in the example above. <div id="readme" class="md" data-path="README.md"><article class="markdown-body entry-content container-lg" itemprop="text"><h1><a id="user-content-datasette-render-html" class="anchor" aria-hidden="true" href="#user-content-datasette-render-html"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>datasette-render-html</h1> <p><a href="https://pypi.org/project/datasette-render-html/" rel="nofollow"><img src="https://camo.githubusercontent.com/d6cf26d5dc49484049bd4fa79e43a5d4571ca85ca03001436695b0c9c6046bf5/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f6461746173657474652d72656e6465722d68746d6c2e737667" alt="PyPI" data-canonical-src="https://img.shields.io/pypi/v/datasette-render-html.svg" style="max-width:100%;"></a> <a href="https://circleci.com/gh/simonw/datasette-render-html" rel="nofollow"><img src="https://camo.githubusercontent.com/27f16d9427d77d3a778994ee51b122ccd4e070ddb3e698e778506b4ac7d88bd2/68747470733a2f2f636972636c6563692e636f6d2f67682f73696d6f6e772f6461746173657474652d72656e6465722d68746d6c2e7376673f7374796c653d737667" alt="CircleCI" data-canonical-src="https://circleci.com/gh/simonw/datasette-render-html.svg?style=svg" style="max-width:100%;"></a> <a href="https://github.com/simonw/datasette-render-html/blob/master/LICENSE"><img src="https://camo.githubusercontent.com/1698104e976c681143eb0841f9675c6f802bb7aa832afc0c7a4e719b1f3cf955/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322e302d626c75652e737667" alt="License" data-canonical-src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" style="max-width:100%;"></a></p> <p>This Datasette plugin lets you configure Datasette to render specific columns as HTML in the table and row interfaces.</p> <p>This means you can store HTML in those columns and have it rendered as such on those pages.</p> <p>If you have a database called <code>docs.db</code> containing a <code>glossary</code> table and you want the <code>definition</code> column in that table to be rendered as HTML, you would use a <code>metadata.json</code> file that looks like this:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="{ &quot;databases&quot;: { &quot;docs&quot;: { &quot;tables&quot;: { &quot;glossary&quot;: { &quot;plugins&quot;: { &quot;datasette-render-html&quot;: { &quot;columns&quot;: [&quot;definition&quot;] } } } } } } } "><pre><code>{ "databases": { "docs": { "tables": { "glossary": { "plugins": { "datasette-render-html": { "columns": ["definition"] } } } } } } } </code></pre></div> <h2><a id="user-content-security" class="anchor" aria-hidden="true" href="#user-content-security"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Security</h2> <p>This plugin allows HTML to be rendered exactly as it is stored in the database. As such, you should be sure only to use this against columns with content that you trust - otherwise you could open yourself up to an <a href="https://owasp.org/www-community/attacks/xss/" rel="nofollow">XSS attack</a>.</p> <p>It's possible to configure this plugin to apply to columns with specific names across whole databases or the full Datasette instance, but doing so is not safe. It could open you up to XSS vulnerabilities where an attacker composes a SQL query that results in a column containing unsafe HTML.</p> <p>As such, you should only use this plugin against specific columns in specific tables, as shown in the example above.</p> </article></div>            

Links from other tables

  • 3 rows from repo in releases
Powered by Datasette · Queries took 3.674ms