kswedberg / jquery-expander

Expand and Collapse HTML content
https://kswedberg.github.io/jquery-expander/
Other
459 stars 168 forks source link

Long url #117

Open artbuz opened 8 years ago

artbuz commented 8 years ago

Hello, expander is not correct work in div with innerHTML:

<a target="_blank" href="http://vk.com/id9070112">Дмитрий</a>, про этого не знаю.<br>Но вчера про одного смешного депутата ЕР видос смешной видел.<br>Вот депутат: <a target="_blank" href="http://xn--90abbh4almacbfls5k1a2c.xn--p1ai/%D0%B1%D0%BE%D0%BB%D1%8C%D1%88%D…%D0%B5%D0%B9-%D0%B2%D0%B0%D1%81%D0%B8%D0%BB%D1%8C%D0%B5%D0%B2%D0%B8%D1%87/">http://xn--90abbh4almacbfls5k1a2c.xn--p1ai/%D0%B1%D0%BE%D0%BB%D1%8C%D1%88%D…%D0%B5%D0%B9-%D0%B2%D0%B0%D1%81%D0%B8%D0%BB%D1%8C%D0%B5%D0%B2%D0%B8%D1%87/</a> <br>И вот видос.

expander has next settings:

this.$body.expander({
      slicePoint: 300,
      expandAfterSummary: true, 
      expandText: 'раскрыть',
      collapseSpeed: 0,
      collapseEffect: 'fadeOut',
      userCollapseText: 'свернуть'
    });

result in expanded state incorrect: image

kswedberg commented 8 years ago

Hi @artbuz , I tried to troubleshoot this, but I'm kind of stuck because there's some malformed html in there. The URI isn't valid. Would you mind taking a look and seeing if you can fix that? I doubt that's the only problem here, but I can't really continue until it's fixed.

artbuz commented 8 years ago

Hi @kswedberg , oh sorry

valid url - http://xn--90abbh4almacbfls5k1a2c.xn--p1ai/%D0%B1%D0%BE%D0%BB%D1%8C%D1%88%D0%B5%D0%B4%D0%B0%D0%BD%D0%BE%D0%B2-%D0%B0%D0%BB%D0%B5%D0%BA%D1%81%D0%B5%D0%B9-%D0%B2%D0%B0%D1%81%D0%B8%D0%BB%D1%8C%D0%B5%D0%B2%D0%B8%D1%87/

innerHTML:

<a target="_blank" href="http://vk.com/id9070112">Дмитрий</a>, про этого не знаю.<br>Но вчера про одного смешного депутата ЕР видос смешной видел.<br>Вот депутат: <a target="_blank" href="http://xn--90abbh4almacbfls5k1a2c.xn--p1ai/%D0%B1%D0%BE%D0%BB%D1%8C%D1%88%D0%B5%D0%B4%D0%B0%D0%BD%D0%BE%D0%B2-%D0%B0%D0%BB%D0%B5%D0%BA%D1%81%D0%B5%D0%B9-%D0%B2%D0%B0%D1%81%D0%B8%D0%BB%D1%8C%D0%B5%D0%B2%D0%B8%D1%87/">http://xn--90abbh4almacbfls5k1a2c.xn--p1ai/%D0%B1%D0%BE%D0%BB%D1%8C%D1%88%D0%B5%D0%B4%D0%B0%D0%BD%D0%BE%D0%B2-%D0%B0%D0%BB%D0%B5%D0%BA%D1%81%D0%B5%D0%B9-%D0%B2%D0%B0%D1%81%D0%B8%D0%BB%D1%8C%D0%B5%D0%B2%D0%B8%D1%87/</a> <br>И вот видос.
travco commented 8 years ago

Sorry to jump in this a little late,

Seems to work just fine for me with the most recent innerHTML you gave on the most recent version of Chrome & jquery-expander:

screenshot from 2016-08-22 15 41 24

If this is still giving you issues, knowing your browser&version would help debugging.