Download in other formats: Plain Text Link in 1.0 RC

29 views
Skip to first unread message

Mike Doroshenko II

unread,
Sep 21, 2012, 12:49:36 PM9/21/12
to trac-...@googlegroups.com
In Trac clicking the "Plain Text" link under "Download in other formats"
would display the source of the wiki page in the browser. Now it makes
my browser download a text file.

The latter behavior logically makes more sense as it says download, but
I prefer the old behavior (I could still save it should I wish, but also
can just take a quick look at the code to ensure the pages on my live
and backup instance are the same).

Is it possible to change this?

--
Mike Doroshenko, Junior Sys Admin
TecKnoQuest Inc.
mi...@tecknoquest.com
www.tecknoquest.com

RjOllos

unread,
Sep 24, 2012, 8:53:22 PM9/24/12
to trac-...@googlegroups.com, mi...@tecknoquest.com
On Friday, September 21, 2012 9:49:48 AM UTC-7, Mike Doroshenko II wrote:
In Trac clicking the "Plain Text" link under "Download in other formats"
would display the source of the wiki page in the browser. Now it makes
my browser download a text file.

The latter behavior logically makes more sense as it says download, but
I prefer the old behavior (I could still save it should I wish, but also
can just take a quick look at the code to ensure the pages on my live
and backup instance are the same).

Is it possible to change this?

The behavior changed in this ticket:


rblank agrees with your comment ;) 

As for changing the behavior, I think you'd have to open a feature request. I read through ticket ##10412 pretty quickly, but it sounded like a `render_unsafe_content` option could be added to effect the download of pages vs rendering in browser.

Mike Doroshenko II

unread,
Sep 25, 2012, 11:16:06 AM9/25/12
to trac-...@googlegroups.com
Anyone?

Mike Doroshenko II

unread,
Sep 25, 2012, 11:18:34 AM9/25/12
to trac-...@googlegroups.com
Oh sorry I didn't see your reply until after I sent my last message.

Is it possible to change the behavior by editing the source?

RjOllos wrote:
--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/zw_CEOmxqJsJ.
To post to this group, send email to trac-...@googlegroups.com.
To unsubscribe from this group, send email to trac-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

Steffen Hoffmann

unread,
Sep 25, 2012, 11:48:41 AM9/25/12
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 25.09.2012 17:18, Mike Doroshenko II wrote:
> Oh sorry I didn't see your reply until after I sent my last message.
>
> Is it possible to change the behavior by editing the source?

Sure, plainly reverting [11233] [1] will do.

But doing it without patching the source will be preferred. Are you
familiar with writing a plugin? If so, try to implement a
ITemplateStreamFilter [2], that does the change at runtime, so you don't
need to mess with Trac core on each update.

As Ryan pointed out, it's possible, that you can convince core
developers to revert or alter the behavior in some way. This would be
preferred by me as well. So open a ticket for discussion and advertise
it here, please.

Steffen Hoffmann


[1] http://trac.edgewall.org/changeset/11233
[2]
http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.ITemplateStreamFilter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlBh0lcACgkQ31DJeiZFuHfcaACfdXGJoLqMlso3NmAu4c0P08cv
wTgAoK5CaadCqCdgqomQP7El4gKNw7vP
=K1Dg
-----END PGP SIGNATURE-----

Mike Doroshenko II

unread,
Sep 26, 2012, 1:22:51 PM9/26/12
to trac-...@googlegroups.com
http://trac.edgewall.org/ticket/10870#no4
I just made Ticket #10870

I am not familiar with writing plugins yet, sounds like a fun project
for the future :)

Mike

unread,
Sep 27, 2012, 10:23:18 PM9/27/12
to trac-...@googlegroups.com
I just discovered that to forward inline in SeaMonkey you click the arrow next to forward :\ Up until now I was just clicking the button and having messages forward as attachments. Viewing messages in SeaMonkey doesn't matter, but on my phone :\ And one time I forwarded as attachment (But in Thunderbird) to my boss and when he viewed it in Apple Mail is just shows a bunch of EML files without their contents unlike TB and SM. Oh and webmail.

Sorry I was excited and being chatty lol, anyways, It looks like an option will be added :)

-------- Original Message --------
Subject: Re: [The Trac Project] #10870: Download in other formats: Plain Text Link in 1.0 RC Used to view in browser, now downloads file
Date: Thu, 27 Sep 2012 21:44:05 -0000
From: The Trac Project <nor...@edgewall.com>
Reply-To: nor...@edgewall.com
CC: trac-t...@lynx.edgewall.com


#10870: Download in other formats: Plain Text Link in 1.0 RC Used to view in
browser, now downloads file
--------------------------+--------------------------------
 Reporter:  miked@…       |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  next-stable-1.0.x
Component:  web frontend  |     Version:  1.0-stable
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------------------
Release Notes:



API Changes:


--------------------------+--------------------------------
Changes (by cboos):

 * milestone:  1.0.1 => next-stable-1.0.x


Comment:

 I think we could have some user preference for this, for those who really
 want to have the unsafe behavior. There we could easily add a hint to
 explain the issue.

 e.g.

 `[ ]` Open plain text attachments directly in the browser
  // This can present a security hazard as some browsers will try to
 "guess" the MIME type of the file from its content regardless of what was
 specified. If someone crafts an attachment which contains malicious HTML
 markup (think XSS), you'll be vulnerable. //

-- 
Ticket URL: <http://trac.edgewall.org/ticket/10870#comment:10>
The Trac Project <http://trac.edgewall.org/>
The Trac Project


Mike Doroshenko II wrote:
Reply all
Reply to author
Forward
0 new messages