diff --git a/public/themes/pterodactyl/js/admin/new-server.js b/public/themes/pterodactyl/js/admin/new-server.js index 1fd80a921..1437c04e2 100644 --- a/public/themes/pterodactyl/js/admin/new-server.js +++ b/public/themes/pterodactyl/js/admin/new-server.js @@ -109,6 +109,12 @@ $('#pEggId').on('change', function (event) { ), }); + function escapeHtml(str) { + var div = document.createElement('div'); + div.appendChild(document.createTextNode(str)); + return div.innerHTML; + } + const variableIds = {}; $('#appendVariablesTo').html(''); $.each(_.get(objectChain, 'variables', []), function (i, item) { @@ -117,11 +123,11 @@ $('#pEggId').on('change', function (event) { let isRequired = (item.required === 1) ? 'Required ' : ''; let dataAppend = ' \
' + item.description + '
\
- Access in Startup: {{' + item.env_variable + '}}
\
- Validation Rules: ' + item.rules + '
' + escapeHtml(item.description) + '
\
+ Access in Startup: {{' + escapeHtml(item.env_variable) + '}}
\
+ Validation Rules: ' + escapeHtml(item.rules) + '