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 34947 151e611fc58be5d94d89433f2fed240262b3c367
parent 34946 6ee566914e65ac3528fd2cf1bae373126c47ff38
child 34948 14ebd9e548a2cbb961ae976ccd2a82dd63c0a8e3
push id1829
push usereakhgari@mozilla.com
push dateThu, 24 Feb 2011 19:47:01 +0000
reviewerswuno, bzbarsky, dveditz
bugs377392
milestone1.9.2.15pre
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
@@ -4323,17 +4323,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);