|
@@ -126,7 +126,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
preserveWhiteSpace(text) {
|
|
preserveWhiteSpace(text) {
|
|
|
- text = text.replace(/(?:\r\n|\r|\n)/g, '<br />')
|
|
|
|
|
|
|
+ text = text.replace(/\r\n|\r|\n/g, '<br />')
|
|
|
// Search for tags or whitespace. Escape whitespace, leave tags.
|
|
// Search for tags or whitespace. Escape whitespace, leave tags.
|
|
|
text = text.replace(/<[^<]+>|( )/g, function(match, group1) {
|
|
text = text.replace(/<[^<]+>|( )/g, function(match, group1) {
|
|
|
if (group1 == " ") { return ' ' }
|
|
if (group1 == " ") { return ' ' }
|
|
@@ -174,10 +174,11 @@
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
process() {
|
|
process() {
|
|
|
- var prompt = this.visible ? this.prompt : '';
|
|
|
|
|
- ev.trigger('disp_add', prompt + this.command.value + '\n')
|
|
|
|
|
- ev.trigger('cmd_entered', this.command.value)
|
|
|
|
|
|
|
+ var prompt = this.visible ? this.prompt : ''
|
|
|
|
|
+ var command = he.encode(this.command.value)
|
|
|
this.command.value = ''
|
|
this.command.value = ''
|
|
|
|
|
+ ev.trigger('disp_add', prompt + command + '\n')
|
|
|
|
|
+ ev.trigger('cmd_entered', command)
|
|
|
}
|
|
}
|
|
|
</commandline>
|
|
</commandline>
|
|
|
|
|
|