Use text() instead of html()
Using html() makes it possible to insert <script> tags in the DOM, and in this case we aren't supposed to be inserting any HTML. I haven't found a way to focus on a field with Capybara, then add a character, and focus on another field. So I've manually triggered the change event in the test.
This commit is contained in:
@@ -33,10 +33,10 @@
|
||||
editor.toggleClass("fullscreen");
|
||||
$(".fullscreen-container").toggleClass("medium-8", "medium-12");
|
||||
span = $(this).find("span");
|
||||
if (span.html() === span.data("open-text")) {
|
||||
span.html(span.data("closed-text"));
|
||||
if (span.text() === span.data("open-text")) {
|
||||
span.text(span.data("closed-text"));
|
||||
} else {
|
||||
span.html(span.data("open-text"));
|
||||
span.text(span.data("open-text"));
|
||||
}
|
||||
if (editor.hasClass("fullscreen")) {
|
||||
App.MarkdownEditor.find_textarea(editor).height($(window).height() - 100);
|
||||
|
||||
Reference in New Issue
Block a user