You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
I've got a member in a chat who uses iChat (I believe, it might be Adium) which causes problems. The following error is received in Firefox's debugging console:
function Candy.Core.Event</self.Jabber.Message() " - error - " Error: Syntax error, unrecognized expression: Bygglovsgruppen har möte, efter mötet med bygglov i går morse. Stackspårning: Sizzle</Sizzle.error@https://chat.kulturhusfestivalen.se/extlib/jquery.js:1464:2 Sizzle</Sizzle.tokenize@https://chat.kulturhusfestivalen.se/extlib/jquery.js:2079:1 Sizzle</Sizzle.select@https://chat.kulturhusfestivalen.se/extlib/jquery.js:2480:11 Sizzle@https://chat.kulturhusfestivalen.se/extlib/jquery.js:879:2 .find@https://chat.kulturhusfestivalen.se/extlib/jquery.js:2696:4 jQuery.fn.init@https://chat.kulturhusfestivalen.se/extlib/jquery.js:2816:5 jQuery@https://chat.kulturhusfestivalen.se/extlib/jquery.js:72:3 Candy.Util</self.parseAndCropXhtml@https://chat.kulturhusfestivalen.se/candy.bundle.js:692:9 Candy.View.Pane</self.Message.show@https://chat.kulturhusfestivalen.se/candy.bundle.js:4855:17 Candy.View.Observer</self.Message@https://chat.kulturhusfestivalen.se/candy.bundle.js:3032:13 jQuery.event.dispatch@https://chat.kulturhusfestivalen.se/extlib/jquery.js:4663:1 jQuery.event.add/elemData.handle@https://chat.kulturhusfestivalen.se/extlib/jquery.js:4321:1 jQuery.event.trigger@https://chat.kulturhusfestivalen.se/extlib/jquery.js:4570:5 .triggerHandler@https://chat.kulturhusfestivalen.se/extlib/jquery.js:5304:4 Candy.Core.Event</self.Jabber.Room.Message@https://chat.kulturhusfestivalen.se/candy.bundle.js:2742:21 Candy.Core.Event</self.Jabber.Message@https://chat.kulturhusfestivalen.se/candy.bundle.js:2334:17 Strophe.Handler.prototype.run@https://chat.kulturhusfestivalen.se/libs/libs.bundle.js:1619:17 Strophe.Connection.prototype._dataRecv/<@https://chat.kulturhusfestivalen.se/libs/libs.bundle.js:2470:1 Strophe.forEachChild@https://chat.kulturhusfestivalen.se/libs/libs.bundle.js:771:21 Strophe.Connection.prototype._dataRecv@https://chat.kulturhusfestivalen.se/libs/libs.bundle.js:2459:13 Strophe.Bosh.prototype._onRequestStateChange@https://chat.kulturhusfestivalen.se/libs/libs.bundle.js:3766:17 "Syntax error, unrecognized expression: Bygglovsgruppen har möte, efter mötet med bygglov i går morse."
I don't have a big selection of strings sent from that client causing the problem, but the following is one: Bygglovsgruppen har möte, efter mötet med bygglov i går morse.
(as you can see it has unicode characters, though I'm not sure they're related)
The issue, after getting some help from that horrible error message, seems to be in candy.bundle.js for the Candy.View.Pane.Message.show method when it is supplied a (probably incorrect then) xhtmlMessage parameter.
The function is at about line 4850 in my copy of the bundled JS and it is the function called here: if (xhtmlMessage) { xhtmlMessage = Candy.Util.parseAndCropXhtml(xhtmlMessage, Candy.View.getOptions().crop.message.body); }
which looks like this: self.parseAndCropXhtml = function(str, len) { alert(str); return $("<div/>").append(self.createHtml($(str).get(0), len)).html(); };
...I'll just publish this issue now and can fill out more info later. Does anyone else have this experience - or figure out what happens that causes the error - or should I debug some more and elaborate?
The text was updated successfully, but these errors were encountered:
this looks to me like the awesome unicode errors because of the cropping. It does most likely crop in the middle of a unicode character..
There are some libraries as far as I remember which handle unicode correctly. Will need to find them again, but maybe what I wrote here helps you already in figuring out how to fix it ;)
I got similar issue, but it was with latest candy dev code.
My solution was changing the event.js in line 863 from var xhtmlMessage = $($('<div>').append(xhtmlChild.children('body').first().contents()).html());
to var xhtmlMessage = $($('<div>').append(xhtmlChild.children('body').first().clone()).html());
I've got a member in a chat who uses iChat (I believe, it might be Adium) which causes problems. The following error is received in Firefox's debugging console:
function Candy.Core.Event</self.Jabber.Message() " - error - " Error: Syntax error, unrecognized expression: Bygglovsgruppen har möte, efter mötet med bygglov i går morse. Stackspårning: Sizzle</Sizzle.error@https://chat.kulturhusfestivalen.se/extlib/jquery.js:1464:2 Sizzle</Sizzle.tokenize@https://chat.kulturhusfestivalen.se/extlib/jquery.js:2079:1 Sizzle</Sizzle.select@https://chat.kulturhusfestivalen.se/extlib/jquery.js:2480:11 Sizzle@https://chat.kulturhusfestivalen.se/extlib/jquery.js:879:2 .find@https://chat.kulturhusfestivalen.se/extlib/jquery.js:2696:4 jQuery.fn.init@https://chat.kulturhusfestivalen.se/extlib/jquery.js:2816:5 jQuery@https://chat.kulturhusfestivalen.se/extlib/jquery.js:72:3 Candy.Util</self.parseAndCropXhtml@https://chat.kulturhusfestivalen.se/candy.bundle.js:692:9 Candy.View.Pane</self.Message.show@https://chat.kulturhusfestivalen.se/candy.bundle.js:4855:17 Candy.View.Observer</self.Message@https://chat.kulturhusfestivalen.se/candy.bundle.js:3032:13 jQuery.event.dispatch@https://chat.kulturhusfestivalen.se/extlib/jquery.js:4663:1 jQuery.event.add/elemData.handle@https://chat.kulturhusfestivalen.se/extlib/jquery.js:4321:1 jQuery.event.trigger@https://chat.kulturhusfestivalen.se/extlib/jquery.js:4570:5 .triggerHandler@https://chat.kulturhusfestivalen.se/extlib/jquery.js:5304:4 Candy.Core.Event</self.Jabber.Room.Message@https://chat.kulturhusfestivalen.se/candy.bundle.js:2742:21 Candy.Core.Event</self.Jabber.Message@https://chat.kulturhusfestivalen.se/candy.bundle.js:2334:17 Strophe.Handler.prototype.run@https://chat.kulturhusfestivalen.se/libs/libs.bundle.js:1619:17 Strophe.Connection.prototype._dataRecv/<@https://chat.kulturhusfestivalen.se/libs/libs.bundle.js:2470:1 Strophe.forEachChild@https://chat.kulturhusfestivalen.se/libs/libs.bundle.js:771:21 Strophe.Connection.prototype._dataRecv@https://chat.kulturhusfestivalen.se/libs/libs.bundle.js:2459:13 Strophe.Bosh.prototype._onRequestStateChange@https://chat.kulturhusfestivalen.se/libs/libs.bundle.js:3766:17 "Syntax error, unrecognized expression: Bygglovsgruppen har möte, efter mötet med bygglov i går morse."
I don't have a big selection of strings sent from that client causing the problem, but the following is one:
Bygglovsgruppen har möte, efter mötet med bygglov i går morse.
(as you can see it has unicode characters, though I'm not sure they're related)
The issue, after getting some help from that horrible error message, seems to be in candy.bundle.js for the
Candy.View.Pane.Message.show
method when it is supplied a (probably incorrect then) xhtmlMessage parameter.The function is at about line 4850 in my copy of the bundled JS and it is the function called here:
if (xhtmlMessage) { xhtmlMessage = Candy.Util.parseAndCropXhtml(xhtmlMessage, Candy.View.getOptions().crop.message.body); }
which looks like this:
self.parseAndCropXhtml = function(str, len) { alert(str); return $("<div/>").append(self.createHtml($(str).get(0), len)).html(); };
...I'll just publish this issue now and can fill out more info later. Does anyone else have this experience - or figure out what happens that causes the error - or should I debug some more and elaborate?
The text was updated successfully, but these errors were encountered: