Bug 377392 - 'Copy Link Location' strips random characters from URLs copied to the clipboard; r=wuno,bzbarsky a=dbaron
authorRich Walsh <rich@e-vertise.com>
Thu, 03 Feb 2011 12:11:12 -0500
changeset 61849 30d1de20ece27bf8b53d7745960e13b4b4bc0f8c
parent 61848 d62ae33c94d7ce71f2bb126a4eaf0a5b7a1dae66
child 61850 bc9d7938cdc714d841a23a007adc6eb7b3b0c42d
push id18520
push usereakhgari@mozilla.com
push dateThu, 03 Feb 2011 17:17:51 +0000
treeherdermozilla-central@bc9d7938cdc7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswuno, bzbarsky, dbaron
bugs377392
milestone2.0b12pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 377392 - 'Copy Link Location' strips random characters from URLs copied to the clipboard; r=wuno,bzbarsky a=dbaron
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -4411,17 +4411,17 @@ nsresult PresShell::GetLinkLocation(nsID
 {
 #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);