Skip to content

Commit

Permalink
Escape rootItems in Dev Center before printing
Browse files Browse the repository at this point in the history
  • Loading branch information
jelveh committed Aug 2, 2024
1 parent 09289b5 commit a225552
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dev-center/js/dev-center.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ async function edit_app_section(cur_app_name) {
let items = e.detail.items;

// ----------------------------------------------------
// one Puter files dropped
// One Puter file dropped
// ----------------------------------------------------
if (items.length === 1 && !items[0].isDirectory) {
if (items[0].name.toLowerCase() === 'index.html') {
Expand Down Expand Up @@ -745,6 +745,7 @@ async function edit_app_section(cur_app_name) {
else if (rootKeys.length > 3)
rootItems = rootKeys[0] + ', ' + rootKeys[1] + ', and ' + (rootKeys.length - 2) + ' more item' + (rootKeys.length - 2 > 1 ? 's' : '');

rootItems = html_encode(rootItems);
$('.drop-area').removeClass('drop-area-hover');
$('.drop-area').addClass('drop-area-ready-to-deploy');
drop_area_content = `<p style="margin-bottom:0; font-weight: 500;">${rootItems}</p><p>Ready to deploy 🚀</p>`;
Expand Down

0 comments on commit a225552

Please sign in to comment.