Difference between revisions of "User:Pcallaghan"

From CDOT Wiki
Jump to: navigation, search
m (stripped @ from email to help reduce spam)
m (edited tbird lab section)
Line 54: Line 54:
 
   {
 
   {
 
     if (ItMatchesDelimited(aInString, aInLength,
 
     if (ItMatchesDelimited(aInString, aInLength,
 +
</pre>
 +
 +
And of course, the chain of comments involved:
 +
<pre>
 +
Description:    Opened: 2007-11-08 08:49
 +
 +
Thunderbird makes many things with a . and an @ (for example s@Y...5pm) into a
 +
mailto link.
 +
 +
------- Comment #1 From pcallagh@learn.senecac.on.ca 2007-11-08 09:10:49 -------
 +
 +
Created an attachment (id=799) [details]
 +
stops anything with .. in it from being a mailto link
 +
 +
------- Comment #2 From Lukas Blakk 2007-11-08 10:11:22 -------
 +
 +
(From update of attachment 799 [details])
 +
great patch, one line wonder.
 
</pre>
 
</pre>
  

Revision as of 21:31, 12 November 2007

Peter Callaghan

Email

pcallagh'at'learn.senecac.on.ca

About me

  • Graduated CPA in April 2006
  • Transferred to BSD in Sept 2006
  • Currently enrolled in DPS909

FSOSS paper

Open content at fsoss07

Thunderbird Bug Lab

Stops thunderbird from reporting everything that has '@' and at least one '.' in it as a mailto link. For example S@Y...5PM should not be considered an email. The answer is to simply ignore anything with more than one consecutive '.' in it. See landfill bug #6024

? objdir-tbird-debug
? pcallagh.diff
? security/nss/cmd/shlibsign/NONE
? security/nss/cmd/shlibsign/mangle/NONE
? security/nss/lib/ckfw/builtins/NONE
? security/nss/lib/ckfw/capi/NONE
? security/nss/lib/freebl/NONE
? security/nss/lib/nss/NONE
? security/nss/lib/smime/NONE
? security/nss/lib/softoken/NONE
? security/nss/lib/softoken/legacydb/NONE
? security/nss/lib/ssl/NONE
Index: netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
===================================================================
RCS file: /cvsroot/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp,v
retrieving revision 1.85
diff -u -8 -p -r1.85 mozTXTToHTMLConv.cpp
--- netwerk/streamconv/converters/mozTXTToHTMLConv.cpp	11 Mar 2007 00:17:00 -0000	1.85
+++ netwerk/streamconv/converters/mozTXTToHTMLConv.cpp	5 Nov 2007 23:41:21 -0000
@@ -181,17 +181,17 @@ 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 (inString.FindChar('.', pos) != kNotFound && inString.Find("..") == kNotFound) // if we have a '.' after the @ sign, but no '..' anywhwere
     {
       aOutString.AssignLiteral("mailto:");
       aOutString += aInString;
     }
   }
   else if (aInString[pos] == '.')
   {
     if (ItMatchesDelimited(aInString, aInLength,

And of course, the chain of comments involved:

 Description:    	 Opened: 2007-11-08 08:49

Thunderbird makes many things with a . and an @ (for example s@Y...5pm) into a
mailto link.

------- Comment #1 From pcallagh@learn.senecac.on.ca 2007-11-08 09:10:49 -------

Created an attachment (id=799) [details]
stops anything with .. in it from being a mailto link

------- Comment #2 From Lukas Blakk 2007-11-08 10:11:22 -------

(From update of attachment 799 [details])
great patch, one line wonder.

Tabs Lab

opens new tabs adjacent to the current tab, rather than at the end all the current tabs. Still has problems with closing tabs. Sometimes they close, sometimes they don't. I thought it had something to do with line 1234.

? tabslab.diff
Index: content/tabbrowser.xml
===================================================================
RCS file: /cvsroot/mozilla/browser/base/content/tabbrowser.xml,v
retrieving revision 1.243
diff -u -8 -p -r1.243 tabbrowser.xml
--- content/tabbrowser.xml	18 Sep 2007 00:59:41 -0000	1.243
+++ content/tabbrowser.xml	7 Nov 2007 17:42:50 -0000
@@ -1088,17 +1088,17 @@
             if (!bgLoad) {
               function selectNewForegroundTab(browser, tab) {
                 browser.selectedTab = tab;
               }
               setTimeout(selectNewForegroundTab, 0, getBrowser(), tab);
             }
             if (!bgLoad)
               this.selectedTab = tab;
-            
+            var position = currentTabIndex + 1;
             return tab;
          ]]>
         </body>
       </method>
 
       <method name="loadTabs">
         <parameter name="aURIs"/>
         <parameter name="aLoadInBackground"/>
@@ -1173,18 +1173,18 @@
             t.maxWidth = this.mTabContainer.mTabMaxWidth;
             t.minWidth = this.mTabContainer.mTabMinWidth;
             t.width = 0;
             t.setAttribute("flex", "100");
             t.setAttribute("validate", "never");
             t.setAttribute("onerror", "this.parentNode.parentNode.parentNode.parentNode.addToMissedIconCache(this.getAttribute('image')); this.removeAttribute('image');");
             t.className = "tabbrowser-tab";
 
-            this.mTabContainer.appendChild(t);
-
+            var currentTabIndex = this.mTabContainer.selectedIndex;
+			this.mTabContainer.insertBefore(t, this.mTabContainer.childNodes.item(currentTabIndex + 1));
             if (document.defaultView
                         .getComputedStyle(this.mTabContainer, "")
                         .direction == "rtl") {
               /* In RTL UI, the tab is visually added to the left side of the
                * tabstrip. This means the tabstip has to be scrolled back in
                * order to make sure the same set of tabs is visible before and
                * after the new tab is added */
 
@@ -1234,17 +1234,17 @@
             b.addEventListener("DOMTitleChanged", this.onTitleChanged, true);
 
             if (this.mStrip.collapsed)
               this.setStripVisibilityTo(true);
 
             this.mPrefs.setBoolPref("browser.tabs.forceHide", false);
 
             // wire up a progress listener for the new browser object.
-            var position = this.mTabContainer.childNodes.length-1;
+            var position = currentTabIndex + 1;
             var tabListener = this.mTabProgressListener(t, b, blank);
             const filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"]
                                      .createInstance(Components.interfaces.nsIWebProgress);
             filter.addProgressListener(tabListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
             b.webProgress.addProgressListener(filter, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
             this.mTabListeners[position] = tabListener;
             this.mTabFilters[position] = filter;