6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/10/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#11073] Charset is not set for the "View Source"
*
Your Email Address
*
Spam protection
Enter the letters below:
._.. ..__..___..__ | | || | _/ | \ _|_|/\||__|./__.|__/
Comment
> One more needful thing for non-latin alphabet's users. > When there is generates view of "View Source" [actionID=view_source] > there is setting of the content type of 'text/plain' without charset. > For correctness file /webroot/imp/view.php, lines after 194 should be: > > case 'view_source': > $msg = $contents->fullMessageText(array('stream' => true)); > rewind($msg); > while (!feof($msg)) { > $line=fgets($msg, 4096); > if ($line !== false){ > if (strlen($line)==0) break 1; > if (strpos($line ,"charset=")>0 && ($pos=strpos($line > ,";"))>0){$ct=substr($line,$pos);break 1;} > } > } > fseek($msg, 0, SEEK_END); > $headertext='text/plain'; > if (isset($ct))$headertext.=$ct; > $browser->downloadHeaders('Message Source', $headertext, true, > ftell($msg)); > > INSTEAD OF > > case 'view_source': > $msg = $contents->fullMessageText(array('stream' => true)); > fseek($msg, 0, SEEK_END); > $browser->downloadHeaders('Message Source', 'text/plain', true, > ftell($msg)); >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers