FIX: Trim whitespaces and do a global replace.

This commit is contained in:
Guo Xiang Tan
2016-06-16 16:35:23 +08:00
parent ab11251f63
commit 4df224bb79
2 changed files with 5 additions and 5 deletions

View File

@ -91,7 +91,7 @@ export default Ember.Controller.extend({
let pollHeader = '[poll';
let output = '';
if (pollName) pollHeader += ` name=${pollName.replace(' ', '-')}`;
if (pollName) pollHeader += ` name=${pollName.trim().replace(/\s/g, '-')}`;
if (pollType) pollHeader += ` type=${pollType}`;
if (pollMin && showMinMax) pollHeader += ` min=${pollMin}`;
if (pollMax) pollHeader += ` max=${pollMax}`;