in reply to Feature idea for code tags

I can see that possibly getting abused with people trying to be clever (<code savename="bash">?). What might be just as useful, and potentially easier to implement is simply to add an index to the default name. So the first code block on the page would be 648493-1.pl, the second 648493-2.pl, etc...


We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re^2: Feature idea for code tags
by shmem (Chancellor) on Dec 01, 2007 at 16:16 UTC
    I can see that possibly getting abused with people trying to be clever (<code savename="bash">?).
    Not a big deal, as long as you aren't browsing as root, stuff your downloads automatically into /bin, have your browser overwrite exising files without asking, and do a chmod a+x on each downloaded file without looking.

    So what? Let a malicious monk (I doubt there are many of them here) try to make me save a file as /sbin/init, and be assured there will be a post in Perl Monks Discussion warning all Monasterians about the scoundrel.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re^2: Feature idea for code tags
by aufflick (Deacon) on Dec 04, 2007 at 03:03 UTC
    This could be addressed by modifying the name - eg. prefixing all downloads with "pm-" or somesuch.