mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Merge pull request #1715 from BoostIO/sanitize-options
Make sanitization configurable
This commit is contained in:
@@ -91,7 +91,8 @@ class UiTab extends React.Component {
|
||||
latexBlockOpen: this.refs.previewLatexBlockOpen.value,
|
||||
latexBlockClose: this.refs.previewLatexBlockClose.value,
|
||||
scrollPastEnd: this.refs.previewScrollPastEnd.checked,
|
||||
smartQuotes: this.refs.previewSmartQuotes.checked
|
||||
smartQuotes: this.refs.previewSmartQuotes.checked,
|
||||
sanitize: this.refs.previewSanitize.value
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,6 +443,23 @@ class UiTab extends React.Component {
|
||||
Enable smart quotes
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div styleName='group-section'>
|
||||
<div styleName='group-section-label'>
|
||||
{i18n.__('Sanitization')}
|
||||
</div>
|
||||
<div styleName='group-section-control'>
|
||||
<select value={config.preview.sanitize}
|
||||
ref='previewSanitize'
|
||||
onChange={(e) => this.handleUIChange(e)}
|
||||
>
|
||||
<option value='STRICT'>✅ {i18n.__('Only allow secure html tags (recommended)')}
|
||||
</option>
|
||||
<option value='ALLOW_STYLES'>⚠️ {i18n.__('Allow styles')}</option>
|
||||
<option value='NONE'>❌ {i18n.__('Allow dangerous html tags')}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div styleName='group-section'>
|
||||
<div styleName='group-section-label'>
|
||||
{i18n.__('LaTeX Inline Open Delimiter')}
|
||||
|
||||
Reference in New Issue
Block a user