mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 11:15:49 +08:00
8921058c67
Also: - remove unused code - rename bbcode_ruler to bbcode.ruler - add md.core.textPostProcess.ruler to apply at end of chain (excluding links)
29 lines
597 B
JavaScript
29 lines
597 B
JavaScript
export function setup(helper) {
|
|
// this is built in now
|
|
// TODO: sanitizer needs fixing, does not properly support this yet
|
|
|
|
// we need a custom callback for style handling
|
|
helper.whiteList({
|
|
custom: function(tag,attr,val) {
|
|
if (tag !== 'th' && tag !== 'td') {
|
|
return false;
|
|
}
|
|
|
|
if (attr !== 'style') {
|
|
return false;
|
|
}
|
|
|
|
return (val === 'text-align:right' || val === 'text-align:left' || val === 'text-align:center');
|
|
}
|
|
});
|
|
|
|
helper.whiteList([
|
|
'table',
|
|
'tbody',
|
|
'thead',
|
|
'tr',
|
|
'th',
|
|
'td',
|
|
]);
|
|
}
|