Skip to content

Commit 1800d1c

Browse files
committed
Fix bug preventing variables with quotes from rendering in the ACP.
1 parent 81869bd commit 1800d1c

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

resources/themes/pterodactyl/admin/servers/view/startup.blade.php

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -122,24 +122,9 @@
122122
{!! Theme::js('vendor/lodash/lodash.js') !!}
123123
<script>
124124
$(document).ready(function () {
125-
$('#pNestId').select2({
126-
placeholder: 'Select a Nest',
127-
}).change();
128-
$('#pEggId').select2({
129-
placeholder: 'Select a Nest Egg',
130-
});
131-
$('#pPackId').select2({
132-
placeholder: 'Select a Service Pack',
133-
});
134-
135-
$('input[data-action="match-regex"]').on('keyup', function (event) {
136-
if (! $(this).data('regex')) return;
137-
138-
var input = $(this).val();
139-
var regex = new RegExp($(this).data('regex').replace(/^\/|\/$/g, ''));
140-
141-
$(this).parent().parent().removeClass('has-success has-error').addClass((! regex.test(input)) ? 'has-error' : 'has-success');
142-
});
125+
$('#pNestId').select2({placeholder: 'Select a Nest'}).change();
126+
$('#pEggId').select2({placeholder: 'Select a Nest Egg'});
127+
$('#pPackId').select2({placeholder: 'Select a Service Pack'});
143128
});
144129
</script>
145130
<script>
@@ -192,7 +177,7 @@
192177
<h3 class="box-title">' + isRequired + item.name + '</h3> \
193178
</div> \
194179
<div class="box-body"> \
195-
<input data-action="match-regex" name="environment[' + item.env_variable + ']" class="form-control" type="text" value="' + setValue + '" /> \
180+
<input name="environment[' + item.env_variable + ']" class="form-control" type="text" id="egg_variable_' + item.env_variable + '" /> \
196181
<p class="no-margin small text-muted">' + item.description + '</p> \
197182
</div> \
198183
<div class="box-footer"> \
@@ -202,6 +187,7 @@
202187
</div> \
203188
</div>';
204189
$('#appendVariablesTo').append(dataAppend);
190+
$('#appendVariablesTo').find('#egg_variable_' + item.env_variable).val(setValue);
205191
});
206192
});
207193
</script>

0 commit comments

Comments
 (0)