<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,6 +10,11 @@
 //Extend WYMeditor
 WYMeditor.editor.prototype.wildfire = function() {
   var wym = this;
+  /****** Allow more things through the xhtml parse *******/
+  WYMeditor.XhtmlValidator._tags.a.attributes[7]=&quot;target&quot;;
+  
+  
+  /*******************************************/
   
   jQuery(wym._box).find(&quot;.wym_tools_superscript&quot;).remove();
   jQuery(wym._box).find(&quot;.wym_tools_subscript&quot;).remove();
@@ -27,8 +32,14 @@ WYMeditor.editor.prototype.wildfire = function() {
 	    var theURL = prompt(&quot;Enter the URL for this link:&quot;, &quot;http://&quot;);
 	    if (theURL != null) {
 	      var str_target = jQuery(&quot;#link_target&quot;).val();
-	      wym._exec('CreateLink', theURL);
-	      if(str_target.length) jQuery(wym._iframe.contentWindow.getSelection().focusNode.parentNode).attr('target', str_target);
+	      
+	      if(str_target.length) {
+	        wym.wrap(&quot;&lt;a href = '&quot; + theURL + &quot;' target='_blank'&gt;&quot;, &quot;&lt;/a&gt;&quot;);
+	      } else {
+	        wym._exec('CreateLink', theURL);
+	      }
+	      
+	      
 	      jQuery(&quot;#link_dialog&quot;).dialog(&quot;close&quot;);
 	      return true;
 	    }
@@ -38,8 +49,14 @@ WYMeditor.editor.prototype.wildfire = function() {
 	    theURL = jQuery(&quot;#link_file&quot;).val();
 	    if (theURL != null) { 
 	      var str_target = jQuery(&quot;#link_target&quot;).val();
-	      wym._exec('CreateLink', theURL);
-	      if(str_target.length) jQuery(wym._iframe.contentWindow.getSelection().focusNode.parentNode).attr('target', str_target);
+
+	      if(str_target.length) {
+	        wym.wrap(&quot;&lt;a href = '&quot; + theURL + &quot;' target='_blank'&gt;&quot;, &quot;&lt;/a&gt;&quot;);
+	      } else {
+	        wym._exec('CreateLink', theURL);
+	      }
+
+
 	      jQuery(&quot;#link_dialog&quot;).dialog(&quot;close&quot;);
 	    }
 	  });</diff>
      <filename>resources/public/javascripts/cms/jquery.wymeditor.wildfire.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a9d46a1a5ceb628873be55430ed0c1505782fecb</id>
    </parent>
    <parent>
      <id>9cafd927f75b85cdb71943d5faf21770e33eb1e0</id>
    </parent>
  </parents>
  <author>
    <name>Michal Noskovic</name>
    <email>michal@michals-MacBook-Pro.local</email>
  </author>
  <url>http://github.com/phpwax/wildfire/commit/e6927027eae466f41a7b46dcd6249df21e96dcd2</url>
  <id>e6927027eae466f41a7b46dcd6249df21e96dcd2</id>
  <committed-date>2009-10-28T03:40:32-07:00</committed-date>
  <authored-date>2009-10-28T03:40:32-07:00</authored-date>
  <message>Merge branch 'v3' of git@github.com:phpwax/wildfire into v3

* 'v3' of git@github.com:phpwax/wildfire:
  added patch to local urls too
  Added target to xhtml</message>
  <tree>a15bd332175b83947e983d8635fc851b241c5000</tree>
  <committer>
    <name>Michal Noskovic</name>
    <email>michal@michals-MacBook-Pro.local</email>
  </committer>
</commit>
