Forums Bug Reports Thread

Mobile wiki editor uses banned native prompt() for link insertion

Patrick Bass · Jun 6 · 14 · 1 Locked
[Major] [High Priority] [Bug Fixed] [Always Reproduces]
🚀 OP Jun 6, 2026 6:11pm

Area: mobieusKnow (audit p6) · Surface: mobieusKnow mobile editor (link toolbar button) · Dimension: native-dialogs · Severity: major

Native browser prompt() is explicitly banned across the platform (no_native_browser_dialogs memory: confirm/alert/prompt banned; use data-confirm or App.modal). On mobile this is the worst place for it — the native iOS/Android prompt ignores the theme, looks like a phishing/malware popup, and breaks the otherwise-polished mobile-v2 shell. Every other mobieusKnow surface correctly uses App.modal.prompt (queue.php) or data-confirm. The desktop editor inserts links via wrapSel('[','](url)') with no dialog at all, so mobile is the only surface that pops a native dialog.

Evidence

platform/templates/mobile/knowledge/editor.php:183-190 — function insertLink() { var s = ta.selectionStart, e = ta.selectionEnd; var sel = ta.value.slice(s, e) || 'link text'; var url = prompt('URL:', 'https://'); if (!url) return; ...}. The toolbar Link button (line 107, data-md-link) calls insertLink() on tap (line 196).

Suggested fix. Replace prompt() with App.modal.prompt(title, message, options, onConfirm) the same way queue.php does, or insert a placeholder '[text](url)' and let the user fill the URL inline (matching the desktop wrapSel approach). Guard for App.modal absence with a graceful no-op fallback.

Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.


Patrick Bass
@mobieus

🚀 Jun 7, 2026 4:59am

Resolved — fixed and deployed. Commit faa14fc59739, shipped dev-first then to all tenants on 2026-06-06.

Replaced the banned native prompt('URL:') in insertLink() with App.modal.prompt (themed, required:true) when available, matching queue.php; guarded for App.modal absence with a non-dialog fallback.

Status: fixed. Thread closed and locked.


Patrick Bass
@mobieus

Log in or register to reply to this thread.