mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-12 08:58:25 +01:00
Escape html entities for mailto URI otherwise server wont let them pass through as it may get mistaken for html tag
- Fix addressbook email action does not work for some emails, eg. Mathias <Mathias@example.com>
This commit is contained in:
parent
91f9bb831b
commit
51a4da3204
@ -58,6 +58,13 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
|||||||
var popup;
|
var popup;
|
||||||
// Get open compose windows
|
// Get open compose windows
|
||||||
var compose = egw.getOpenWindows("mail", /(^compose_)||(^mail.compose)/);
|
var compose = egw.getOpenWindows("mail", /(^compose_)||(^mail.compose)/);
|
||||||
|
|
||||||
|
// Encode html entities in the URI, otheerwise server XSS protection wont
|
||||||
|
// allow it to pass, because it may get mistaken for some forbiden tags,
|
||||||
|
// e.g., "Mathias <mathias@example.com>" the first part of email "<mathias"
|
||||||
|
// including "<" would get mistaken for <math> tag, and server will cut it off.
|
||||||
|
uri = uri.replace(/</g,'<').replace(/>/g,'>');
|
||||||
|
|
||||||
if(compose.length == 0)
|
if(compose.length == 0)
|
||||||
{
|
{
|
||||||
// No compose windows, might be no mail app.js
|
// No compose windows, might be no mail app.js
|
||||||
|
Loading…
Reference in New Issue
Block a user