开发者

Fancybox Caption does not work with Hyperlink including ampersands

I am using the latest Fancybox 1.3.4 and the latest jQuery 1.6.1 and I am also using Hyperlinks in the caption, which works, e.g.:

<a 
  href="pathtoimage.jpg" 
  title="Some text and a hyperlink: &lt;a href=&quot;http://www.someclient.com&quot;&gt;LINKTEXT&lt;/a&gt;">
    <img src="pathtoimage.jpg" alt="alt text of image" />
</a>

But the following does not work if the target URL contains more than one parameter:

title="Some text and a hyperlink: &lt;a  href=&quot;http://www.someclient.com?a=1&amp;b=2&quot;&gt;LINKTEXT&lt;/a&gt;">

How can I encode ?a=1&b=2 correctly so that Fancybox does not break?

Thanks!

Javascript error in Ch开发者_开发问答rome console:

Uncaught Error: INVALID_STATE_ERR: DOM Exception 11
f.extend.cleanjquery-1.6.1.min.js:18
f.buildFragmentjquery-1.6.1.min.js:17
f.fn.extend.domManipjquery-1.6.1.min.js:17
f.fn.extend.appendjquery-1.6.1.min.js:17
f.fn.extend.htmljquery-1.6.1.min.js:17
Qjquery.fancybox-1.3.4.pack.js:27
I.v.onload


This works: see Example at http://wichry.net/page/test.html

Code:

<a href="images/slimak.png" title="Some text and a hyperlink: &lt;a  href=&quot;http://www.someclient.com?a=1&amp;b=2&quot;&gt;LINKTEXT&lt;/a&gt;">
  <img src="images/slimak.png" alt="alt text of image" /> 
</a> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜