Fix some "<br/>" was not being translated correctly
This commit is contained in:
parent
81b21d838f
commit
d5a961ce64
|
@ -137,7 +137,8 @@ function isVisible(element) {
|
|||
}
|
||||
|
||||
function html2text(html) {
|
||||
html = html.replace(/<\/(p|div|br)\/?>/g, function (m){ return m+' ' });
|
||||
html = html.replace(/<\/(p|div)>/g, function (m){ return m+' ' });
|
||||
html = html.replace(/<br\s*\/?>/g, function (m){ return m+' ' });
|
||||
html = html.replace(/\s+/g, ' ');
|
||||
var e = document.createElement('div');
|
||||
e.innerHTML = html;
|
||||
|
|
Loading…
Reference in New Issue