mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 22:02:42 +08:00
FIX: Trim whitespaces and do a global replace.
This commit is contained in:
@ -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}`;
|
||||
|
Reference in New Issue
Block a user