mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
linter: Add checks for sloppy use of .html().
Since jQuery's .html() can be a source of security bugs, we add a new lint rule that tries to catch common problematic uses.
This commit is contained in:
@@ -69,7 +69,7 @@ exports.show_sub_settings = function (sub) {
|
||||
var $settings = $(".subscription_settings[data-stream-id='" + sub.stream_id + "']");
|
||||
if ($settings.find(".email-address").val().length === 0) {
|
||||
// Rerender stream email address, if not.
|
||||
$settings.find(".email-address").html(sub.email_address);
|
||||
$settings.find(".email-address").text(sub.email_address);
|
||||
$settings.find(".stream-email-box").show();
|
||||
}
|
||||
$settings.find(".regular_subscription_settings").addClass('in');
|
||||
|
||||
Reference in New Issue
Block a user