mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 11:20:57 -06:00
strip classes from table instead of ignoring table
This commit is contained in:
parent
e93665b9f7
commit
ecf50a741c
@ -23,7 +23,7 @@ var emitter = function(contents) {
|
||||
};
|
||||
|
||||
var tableBlock = {
|
||||
start: /(<table>)([\S\s]*)/igm,
|
||||
start: /(<table[^>]*>)([\S\s]*)/igm,
|
||||
stop: /<\/table>/igm,
|
||||
rawContents: true,
|
||||
emitter: emitter,
|
||||
|
@ -343,7 +343,7 @@ describe PrettyText do
|
||||
it 'allows table html' do
|
||||
SiteSetting.allow_html_tables = true
|
||||
PrettyText.reset_context
|
||||
table = "<table><thead><tr>\n<th>test</th></tr></thead><tbody><tr><td>a</td></tr></tbody></table>"
|
||||
table = "<table class='fa-spin'><thead><tr>\n<th>test</th></tr></thead><tbody><tr><td>a</td></tr></tbody></table>"
|
||||
match = "<table class=\"md-table\"><thead><tr> <th>test</th> </tr></thead><tbody><tr><td>a</td></tr></tbody></table>"
|
||||
expect(PrettyText.cook(table)).to match_html(match)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user