ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: emanuele on September 11, 2013, 03:35:18 am

Title: first/last message tooltip in messageindex creates invalid html
Post by: emanuele on September 11, 2013, 03:35:18 am
<span class="preview" title="So I wrote a post, then saved it before noticing errant markup at the foot of it - so I tried to use the inline editor/quick modify, which opened but when trying to save I just got the 'session verification failed' warning.&# ..."><span id="msg_1530">
In particular:
Code: [Select]
session verification failed' warning.&# ..."><span id="msg_1530">
_____________________________________^^
Title: Re: first/last message tooltip in messageindex creates invalid html
Post by: Spuds on September 11, 2013, 07:55:09 am
/me wonders who will be first to chime in about those not being needed :P
Title: Re: first/last message tooltip in messageindex creates invalid html
Post by: Spuds on September 11, 2013, 02:00:33 pm
Fixed in the repo and on the site .... now the only validation error is the one we agreed to and one by whoever put that ul in the h2  :P (well on that page of course!)
Title: Re: first/last message tooltip in messageindex creates invalid html
Post by: emanuele on September 11, 2013, 02:13:47 pm
/me is innocent

/me moves teh topic
Title: Re: first/last message tooltip in messageindex creates invalid html
Post by: emanuele on September 11, 2013, 06:29:04 pm
mmm...
I'm having some issues with html_entity_decode:
Code: [Select]
[code]������������// Always one clown in the audience who likes long words or not using the spacebar
������������if (Util::strlen($matches[1]) > $len + $buffer)
���������������$matches[1] = Util::substr($matches[1], 0, $len);

������������$text = rtrim($matches[1]) . ' ...';
���������}
������}
������else
���������$text = Util::substr($text, 0, $len) . '...';

������$t
Apparently tabs I think.
Util::strlen returns 0 but
Code: [Select]
Util::strlen($text) > $len
returns true and the preg_match fails... ???
Title: Re: first/last message tooltip in messageindex creates invalid html
Post by: Spuds on September 11, 2013, 06:56:25 pm
&%#&*# entities ... I hate them to death and php just makes it worse  ... will take another look unless someone else gets to it first ... working on some other bloat to add
Title: Re: first/last message tooltip in messageindex creates invalid html
Post by: emanuele on September 21, 2013, 09:34:48 am
Commenting out the html_entities_decode seems to stop throwing errors, though I'm not sure of the consequences...