From: Jakub Narebski <jnareb@gmail.com>
To: Yasushi SHOJI <yashi@atmark-techno.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: Decode long title for link tooltips
Date: Sun, 1 Oct 2006 23:49:04 +0200 [thread overview]
Message-ID: <200610012349.05391.jnareb@gmail.com> (raw)
In-Reply-To: <87r6xrvi0g.wl@mail2.atmark-techno.com>
Yasushi SHOJI wrote:
> At Sun, 01 Oct 2006 18:45:46 +0200,
> Jakub Narebski wrote:
> >
> > Yasushi SHOJI wrote:
> >
> > > This is a simple one liner to decode long title string in perl's
> > > internal form to utf-8 for link tooltips.
> > >
> > > This is not crucial if the commit message is all in ASCII, however, if
> > > you decide to use other encoding, such as UTF-8, tooltips ain't
> > > readable any more.
> >
> > Perhaps it would be better to abstract it away into esc_attr (as escape
> > attribute) subroutine, if such situation i.e. output of generated string
> > into some attribute of some element happens in some other place.
>
> I liked the idea. there were 7 places already.
>
> I just couldn't get why you picked esc_attr for the name. is there a
> patch for the func I missed?
To keep it in the style of names like esc_param (escaping the GET parameter
to be passed), esc_url (escaping URL to be put as argument of href attribute
of <link> or <a> element) and esc_html (escaping output).
esc_attr is to escape ATTRibutes of elements, for example title attribute.
I'm not sure if CGI module does escaping for example of '"' in attributes...
> anyway, a patch for the abstruction is attached. rename the func name
> if you don't like it.
Anyone can send patch renaming subroutines. to_utf8 is a good name... till
we allow non-utf8 encodings. And the name can be used for other places where
we do string decoding from Perl internal form to utf-8.
> # i don't know how to reply to an email and also attaching a patch
> # from git format-patch. should I just submit the patch in a separate
> # email?
There are two formats used (check out Documentation/SubmittingPatches).
First used for short replies, or some comments which you don't want to have
in commit description (commit message) is to put additional text just right
after "---" separating commit message from the patch.
Second, used for example if reply is longer than commit message, or patch
is just an attachement/footnote to reply, is to put the reply above the
body of message generated by format patch, and separate it from the
patch for example by "-- >8 --". The idea is that committer can remove the
top part of email and apply the rest as is.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2006-10-01 21:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 2:38 [PATCH] gitweb: Escape long title for link tooltips Yasushi SHOJI
2006-09-27 3:06 ` Yasushi SHOJI
2006-09-27 3:04 ` [PATCH] gitweb: Decode " Yasushi SHOJI
2006-10-01 16:45 ` Jakub Narebski
2006-10-01 21:33 ` Yasushi SHOJI
2006-10-01 21:49 ` Jakub Narebski [this message]
2006-10-06 8:54 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200610012349.05391.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=yashi@atmark-techno.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).