Changes

Jump to: navigation, search

User:Mlam19

2,664 bytes added, 15:51, 17 October 2009
no edit summary
|
|}
 
====Week 6 Thunderbird bug fix lab====
=====Review comments=====
<pre><nowiki>------- Comment #2 From Ehren Metcalfe 2009-10-17 12:08:25 [reply] -------
 
(From update of attachment 1402 [details])
diff -r e90895696bde netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
>--- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp Tue Oct 13 16:51:12 2009 -0400
>+++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp Sat Oct 17 13:08:43 2009 -0400
>@@ -191,17 +191,20 @@ mozTXTToHTMLConv::CompleteAbbreviatedURL
> if (pos >= aInLength)
> return;
>
> if (aInString[pos] == '@')
> {
> // only pre-pend a mailto url if the string contains a .domain in it..
> //i.e. we want to linkify johndoe@foo.com but not "let's meet @8pm"
> nsDependentString inString(aInString, aInLength);
>- if (inString.FindChar('.', pos) != kNotFound) // if we have a '.' after the @ sign....
>+ // if we have a '.' after the @ sign,
>+ // and there are not '..' after the @ sign
>+ if (inString.FindChar('.', pos) != kNotFound &&
 
Align second line of if expression with the first (8 spaces vs 12)
 
>+ inString.Find("..", pos) == kNotFound)
> {
> aOutString.AssignLiteral("mailto:");
> aOutString += aInString;
> }
> }
> else if (aInString[pos] == '.')
> {
> if (ItMatchesDelimited(aInString, aInLength,</nowiki></pre>
 
<pre><nowiki>------- Comment #4 From Ehren Metcalfe 2009-10-17 12:23:58 [reply] -------
 
(From update of attachment 1403 [details])
Review passed... looks good to me.</nowiki></pre>
 
=====Patch=====
<pre><nowiki>diff -r e90895696bde netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
--- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp Tue Oct 13 16:51:12 2009 -0400
+++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp Sat Oct 17 15:11:20 2009 -0400
@@ -191,17 +191,20 @@ mozTXTToHTMLConv::CompleteAbbreviatedURL
if (pos >= aInLength)
return;
if (aInString[pos] == '@')
{
// only pre-pend a mailto url if the string contains a .domain in it..
//i.e. we want to linkify johndoe@foo.com but not "let's meet @8pm"
nsDependentString inString(aInString, aInLength);
- if (inString.FindChar('.', pos) != kNotFound) // if we have a '.' after the @ sign....
+ // if we have a '.' after the @ sign,
+ // and there are not '..' after the @ sign
+ if (inString.FindChar('.', pos) != kNotFound &&
+ inString.Find("..", pos) == kNotFound)
{
aOutString.AssignLiteral("mailto:");
aOutString += aInString;
}
}
else if (aInString[pos] == '.')
{
if (ItMatchesDelimited(aInString, aInLength,</nowiki></pre>
===Project===
1
edit

Navigation menu