Bug 377392 - 'Copy Link Location' strips random characters from URLs copied to the clipboard; r=wuno,bzbarsky a=dveditz
authorRich Walsh <rich@e-vertise.com>
Thu, 03 Feb 2011 12:11:12 -0500
changeset 27340 d9a42eb3a7a58ee9a2a4cb9b7a08549c349f6197
parent 27339 0121adef434561abea6597ed6a553783c53fbc1c
child 27341 4447edf333a996dacc3630b751c97d1de8ed6d0f
push id2675
push usereakhgari@mozilla.com
push dateThu, 24 Feb 2011 19:47:26 +0000
reviewerswuno, bzbarsky, dveditz
bugs377392
milestone1.9.1.18pre
Bug 377392 - 'Copy Link Location' strips random characters from URLs copied to the clipboard; r=wuno,bzbarsky a=dveditz
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -4325,17 +4325,17 @@ NS_IMETHODIMP PresShell::GetLinkLocation
 {
 #ifdef DEBUG_dr
   printf("dr :: PresShell::GetLinkLocation\n");
 #endif
 
   NS_ENSURE_ARG_POINTER(aNode);
   nsresult rv;
   nsAutoString anchorText;
-  static char strippedChars[] = {'\t','\r','\n'};
+  static const char strippedChars[] = "\t\r\n";
 
   // are we an anchor?
   nsCOMPtr<nsIDOMHTMLAnchorElement> anchor(do_QueryInterface(aNode));
   nsCOMPtr<nsIDOMHTMLAreaElement> area;
   nsCOMPtr<nsIDOMHTMLLinkElement> link;
   nsAutoString xlinkType;
   if (anchor) {
     rv = anchor->GetHref(anchorText);