[FIX] website_quote: don't unescape menu title

If we take content with $().text(), to insert it in another node we have to
used $().text(value) also. If like before this commit, we would use $().html()
the content would be unescaped one time too much.
This commit is contained in:
Nicolas Lempereur 2016-01-12 13:22:07 +01:00
parent a1d8eccc7e
commit 37ed5ce844
1 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ website.if_dom_contains('div.o_website_quote', function () {
case "h1":
id = _.uniqueId('quote_header_');
$(this.parentNode).attr('id',id);
sub_li = $("<li>").html('<a href="#'+id+'">'+$(this).text()+'</a>').appendTo(ul);
sub_li = $("<li>").html('<a href="#'+id+'"/>').text($(this).text()).appendTo(ul);
sub_ul = null;
break;
case "h2":
@ -94,7 +94,7 @@ website.if_dom_contains('div.o_website_quote', function () {
sub_ul = $("<ul class='nav'>").appendTo(sub_li);
}
$(this.parentNode).attr('id',id);
$("<li>").html('<a href="#'+id+'">'+$(this).text()+'</a>').appendTo(sub_ul);
$("<li>").html('<a href="#'+id+'"/>').text($(this).text()).appendTo(sub_ul);
}
break;
}