#82 open
labman

Xed drafts escaping quotes

Reported by labman | December 2nd, 2008 @ 11:07 AM

This seems to be related to ticket #39 (http://sitellite.lighthouseapp.c... however the fix mentioned in this ticket doesn't seem to solve the problem.

If you edit a "start for your previous draft" draft that Xed creates, that both single and double quotes are being escaped and get slashes added to them. Something like "What's New" becomes "What's New" and images change from test to \"> making them unusable.

Comments and changes to this ticket

  • lux

    lux January 4th, 2009 @ 09:14 PM

    I can't seem to be able to duplicate this one in the latest codebase in any of the browsers. Is it still affecting you and do you have the latest patches as well?

  • labman

    labman January 5th, 2009 @ 09:35 AM

    Seems that my comment for this ticket got a bit garbled with the quotes in my text. I'm still seeing this behavior where starting from a previous draft that Xed autosaved brings up content (that was previously fine) where the single and double quotes are escaped. Also, previously fine links turn into <a href=""http://www.example.com""> when viewed in the source code (if that doesn't come through properly, the quotes in link are both escaped and then requoted.)

    I believe I have the latest Xed patches but to be sure can you point me to the files that should fix this on github? Thanks.

  • lux

    lux January 5th, 2009 @ 01:58 PM

    I'm not sure which commit it is exactly, but you can try pulling the latest code from github and see if that works for you. The fix should be in one of these commits:

    http://github.com/lux/sitellite/...

    Just to be sure, here are the steps I'm doing to reproduce the problem:

    1. Create a page with tags, single quotes and double quotes and save it.
    2. Edit the page again and make a small change so it saves in the drafts.
    3. Leave the page unsaved then edit it again.
    4. Select "Start from your previous draft" when given the option.

    At this point, the data in the editor for you now has extra slashes and quotes, right?

    I've tested the latest code in Firefox, Safari and IE and it seems to work fine, so it's likely just an update you need :)

  • labman

    labman January 6th, 2009 @ 01:56 PM

    You're reproducing it the same way I am but I'm still seeing the issue after updating xed.js to the latest version (12/2). I'm using Firefox, Chrome, and IE7 on Windows (and Firefox on Linux) where it's reproducible.

    I just had a look in the sitellite_autosave table and see that the page was autosaved with the quotes escaped, and every time I repeat the above steps, the escaping increases. So something like Bob's comes up as Bob\'s, then Bob\\\'s etc. Is xed.js the only file that would affect the way autosave works? Thanks.

  • lux

    lux January 6th, 2009 @ 02:13 PM

    • State changed from “new” to “open”

    It sounds like you might need to update the files /js/autosave.js and /js/autosave-compressed.js as well. Those are the ones that handle sending the autosave data to Sitellite.

    On the PHP side, I don't recall that changing recently, but the file would be inc/app/cms/boxes/autosave/index.php.

    Let me know if updating those fixes it.

  • labman

    labman January 6th, 2009 @ 02:48 PM

    No joy. I updated my /js/autosave.js which was out of date by a minor try/catch condition, and my inc/app/cms/boxes/autosave/index.php was the same as the github version, but the situation remains the same. The autosave copy in the database is still getting the quotes in it escaped, so something in the autosave process seems to be causing this since that's when the slashes are being added. When Sitellite opens the draft from the database it isn't making any modifications.

    Related question, what causes Sitellite to use the compressed javascript files versus the uncompressed ones?

  • lux

    lux January 12th, 2009 @ 01:57 AM

    Hmm... It's strange that it's working for me but not you. I wonder if it's just another file that's not the most current...

    If you can, can you try doing a git clone git://github.com/lux/sitellite.git and try setting up a fresh Sitellite site from the latest codebase and see if it's still a problem in that? If it's not, then we know we've got a fix, and it's just a matter of figuring out what's missing from your copy versus the latest code. If it's still an issue, then there may be something I'm missing in trying to reproduce it.

  • labman

    labman January 12th, 2009 @ 12:30 PM

    I'm sure it could be another file that's the culprit. I'm using version 5.0.0 Pro and I don't have a github account. I'll browse github about once a week to see if there are any new commits that I could use and when I find one need, I just download it and compare it to what I have before making changes. Everything is done on a development server first and I've had no issues thus far.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Sitellite web content management system.

People watching this ticket

Tags

Pages