FIX: IE9 issues with latest discourse

This commit is contained in:
Robin Ward 2015-05-25 12:32:24 -04:00
parent bb0c2813ac
commit 78abf85087
2 changed files with 5 additions and 5 deletions

View File

@ -314,7 +314,7 @@ Discourse.Utilities = {
@returns {Promise} a promise that will eventually be the cropped avatar. @returns {Promise} a promise that will eventually be the cropped avatar.
**/ **/
cropAvatar: function(url) { cropAvatar: function(url) {
const extension = /\.(\w{2,})$/.exec(url)[1]; var extension = /\.(\w{2,})$/.exec(url)[1];
if (Discourse.SiteSettings.allow_animated_avatars && extension === "gif") { if (Discourse.SiteSettings.allow_animated_avatars && extension === "gif") {
// can't crop animated gifs... let the browser stretch the gif // can't crop animated gifs... let the browser stretch the gif
return Ember.RSVP.resolve(url); return Ember.RSVP.resolve(url);

View File

@ -2,12 +2,12 @@
(function() { (function() {
const DATA_PREFIX = "data-poll-"; var DATA_PREFIX = "data-poll-";
const DEFAULT_POLL_NAME = "poll"; var DEFAULT_POLL_NAME = "poll";
const WHITELISTED_ATTRIBUTES = ["type", "name", "min", "max", "step", "order", "status"]; var WHITELISTED_ATTRIBUTES = ["type", "name", "min", "max", "step", "order", "status"];
const ATTRIBUTES_REGEX = new RegExp("(" + WHITELISTED_ATTRIBUTES.join("|") + ")=['\"]?[^\\s\\]]+['\"]?", "g"); var ATTRIBUTES_REGEX = new RegExp("(" + WHITELISTED_ATTRIBUTES.join("|") + ")=['\"]?[^\\s\\]]+['\"]?", "g");
Discourse.Dialect.replaceBlock({ Discourse.Dialect.replaceBlock({
start: /\[poll((?:\s+\w+=[^\s\]]+)*)\]([\s\S]*)/igm, start: /\[poll((?:\s+\w+=[^\s\]]+)*)\]([\s\S]*)/igm,