<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>13543</bug_id>
          
          <creation_ts>2007-04-29 12:19:06 -0700</creation_ts>
          <short_desc>javascript: links don&apos;t honor the target attribute</short_desc>
          <delta_ts>2020-12-22 11:46:58 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Geoffrey Garen">ggaren</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>masa141421356</cc>
    
    <cc>rbuis</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11810</commentid>
    <comment_count>0</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2007-04-29 12:19:06 -0700</bug_when>
    <thetext>Reduction coming.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11811</commentid>
    <comment_count>1</comment_count>
      <attachid>14269</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2007-04-29 12:19:28 -0700</bug_when>
    <thetext>Created attachment 14269
reduction</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11812</commentid>
    <comment_count>2</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2007-04-29 12:21:29 -0700</bug_when>
    <thetext>I believe the problem is that the FrameLoader special-cases javascript: URLs to execute them, and the special-casing code ignores the target attribute.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11813</commentid>
    <comment_count>3</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2007-04-29 12:22:04 -0700</bug_when>
    <thetext>Works in Firefox. This is not a regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11814</commentid>
    <comment_count>4</comment_count>
      <attachid>14270</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2007-04-29 12:28:36 -0700</bug_when>
    <thetext>Created attachment 14270
better reduction</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110221</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-02-19 09:58:50 -0800</bug_when>
    <thetext>We should be careful to get the security checks right when we fix this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110383</commentid>
    <comment_count>6</comment_count>
    <who name="sharvani">sharvani.bugzilla</who>
    <bug_when>2009-02-20 04:50:59 -0800</bug_when>
    <thetext>My observations are as follows, 
 
1)In the API FrameLoader::urlSelected() I found that the case when there is a target attribute along with javascript, target is ignored.
 Here if the link is javascript then the script is executed and the control returns without considering the target attribute.The target attribute is considered only if its not a javascript.
 I tried the following,
 1) Execute the javascript directly if the target is empty.
 2) If the target is not empty then load the form and then execute the script in the new form.
 
Now the safari is failing to load the URL on the target while doing navigation policy check.
 
WebFrame::dispatchDecidePolicyForNavigationAction()
{
if
(SUCCEEDED(policyDelegate-&gt;decidePolicyForNavigationAction(d-&gt;webView, actionInformation.get(), urlRequest.get(), this, setUpPolicyListener(function).get()))) 
return;
}
This check is failing.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>132368</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-07-16 15:24:41 -0700</bug_when>
    <thetext>*** Bug 27326 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>726910</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-09-24 12:20:17 -0700</bug_when>
    <thetext>*** Bug 97351 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1716295</commentid>
    <comment_count>9</comment_count>
    <who name="Rob Buis">rbuis</who>
    <bug_when>2020-12-22 11:46:58 -0800</bug_when>
    <thetext>Bug https://bugs.webkit.org/show_bug.cgi?id=174891 seems to be a duplicate of this, OTOH that one has a modern WPT test...</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14269</attachid>
            <date>2007-04-29 12:19:28 -0700</date>
            <delta_ts>2007-04-29 12:28:36 -0700</delta_ts>
            <desc>reduction</desc>
            <filename>reduction.html</filename>
            <type>text/html</type>
            <size>253</size>
            <attacher name="Geoffrey Garen">ggaren</attacher>
            
              <data encoding="base64">PHA+Q2xpY2sgdGhlIHR3byBsaW5rcyBiZWxvdyBpbiBvcmRlci4gWW91IHNob3VsZCBzZWUgYW4g
YWxlcnQgaW4gdGhlIGV4dGVybmFsIHdpbmRvdy48L3A+CjxhIGhyZWY9ImphdmFzY3JpcHQ6d2lu
ZG93Lm9wZW4oJycsICdNeVdpbmRvdycpOyB2b2lkKDApOyI+b3BlbiB3aW5kb3c8L2E+CjxhIGhy
ZWY9ImphdmFzY3JpcHQ6YWxlcnQoMCk7IHZvaWQoMCk7IiB0YXJnZXQ9Ik15V2luZG93Ij5hbGVy
dCB0YXJnZXRlZCBhdCB3aW5kb3c8L2E+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14270</attachid>
            <date>2007-04-29 12:28:36 -0700</date>
            <delta_ts>2007-04-29 12:28:36 -0700</delta_ts>
            <desc>better reduction</desc>
            <filename>reduction.html</filename>
            <type>text/html</type>
            <size>318</size>
            <attacher name="Geoffrey Garen">ggaren</attacher>
            
              <data encoding="base64">PHA+Q2xpY2sgdGhlIHR3byBsaW5rcyBiZWxvdyBpbiBvcmRlci4gWW91IHNob3VsZCBzZWUgJ2hl
bGxvIHdvcmxkJyBpbiBhbiBleHRlcm5hbCB3aW5kb3cuPC9wPgo8b2w+CjxsaT48YSBocmVmPSJq
YXZhc2NyaXB0OndpbmRvdy5vcGVuKCcnLCAnTXlXaW5kb3cnKTsgdm9pZCgwKTsiPm9wZW4gZXh0
ZXJuYWwgd2luZG93PC9hPjwvbGk+CjxsaT48YSBocmVmPSJqYXZhc2NyaXB0OmRvY3VtZW50Lndy
aXRlKCdoZWxsbyB3b3JsZCcpOyBkb2N1bWVudC5jbG9zZSgpIiB0YXJnZXQ9Ik15V2luZG93Ij53
cml0ZSB0byBleHRlcm5hbCB3aW5kb3c8L2E+PC9saT4K
</data>

          </attachment>
      

    </bug>

</bugzilla>