Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #712112

    meruapps
    Participant

    Every time I save a post in Cornerstone, backslashes in my text get stripped. I’ve tested this with the “Text” and “Raw Content” elements. If I don’t user Cornerstone, and instead use the plain WordPress text editor, this doesn’t happen. Is there a way to stop this?

    #712156

    Paul R
    Moderator

    Hi,

    Thanks for writing in!

    I was able to replicate this in my test site.

    I will forward your concern to our web development team for review.

    Kindly stay tuned for updates.

    Thanks

    #715427

    meruapps
    Participant

    Great. Any chance for an ETA for a possible solution or workaround?

    Thanks again for your help

    #715446

    Paul R
    Moderator

    Hi,

    Sorry we don’t have an ETA yet for the fix but rest assured it’s already in our list.

    A workaround is to add a double backslash \\ but the other one will be removed on each save
    so you will need to add again on every edit.

    Sorry for the inconvenience this has caused you.

    Thank you for understanding.

    #758954

    meruapps
    Participant

    I was really hoping this would have been fixed in the most recent update :/

    We really can’t get our work done in a reasonable way until this is fixed. Would you happen to have an update on this?

    #759802

    Rad
    Moderator

    Hi there,

    I checked and backslashes are still stripped out. I’ll note this again 🙂

    For the meantime, would you let us know what you’re trying to do with backlash? Maybe we can provide some alternative.

    Thanks!

    #760152

    meruapps
    Participant

    Thanks for your help.

    We’re starting up a math blog/community that uses a lot of LaTeX, which uses backslashes to delimit most specials math symbols.

    #760921

    Rue Nel
    Moderator

    Hello There,

    LaTex is only supported in WordPress.com which you can check it here: https://en.support.wordpress.com/latex/

    When using LaTex in a self hosted WordPress site, you may try to use a 3rd party plugin such as:
    https://wordpress.org/plugins/wp-latex/

    Or try out some other plugins as well:
    https://wordpress.org/plugins/tags/latex

    I have installed one of the 3rd party plugin to test out if it will work in Cornerstone. I am using MathJax LaTex; https://wordpress.org/plugins/mathjax-latex/

    Instead of having 1 backslash, I added two backward slashes. Please check out my examples:
    http://prntscr.com/9u0c3l
    http://prntscr.com/9u0cd5

    Hope this helps.

    #760939

    meruapps
    Participant

    Hi and thanks for your response. I don’t really need help with the latex portion – I’ve used it before using the Vanilla WordPress editor. I’m using QuickLatex plugin, and it’s working, so I don’t quite understand your comment on LateX only being supported in WordPress.com.

    I do understand adding two backward slashes as a work around. The problem is that when editing a post later on, I have to re-add all the double backward slashes, since once it’s saved it removes the first slash.

    I’ll just patiently wait for a fix. Thanks for your help.

    #761915

    Rad
    Moderator

    You’re welcome, stay tuned for the update and fixes. Thanks!

    #770808

    Alexander
    Keymaster

    Hey meruapps,

    This is Alex, lead developer on Cornerstone. I just wanted to followup here with some comments after some investigation. Regretfully, this isn’t something we’ll be able to address near-term.

    When Cornerstone saves, it does two things. First it stores the entire structure of the page and all of the raw data into post meta. Second, it uses that data to generate an arrangement of shortcodes.

    Because we’re using native WordPress APIs, that first part does us the favor of stripping out all backslashes for security purposes. More technically speaking, it’s built into WordPress to remove slashes from any unserialized data upon being saved into post meta. There are ways around this by first serializing the data ourselves, but we’re talking about changing some fundamental code that would affect the core of how Cornerstone works for everyone.

    This is certainly something I’d like to address. I really don’t like leaving things like this open ended, and I imagine it’s only a matter of time before the root issue at hand comes up in other contexts. However, because of the magnitude of what’s affected, and the risk of breaking sites it’s not something we can commit to in the near future. We will likely have at least one more major release before this is revisited.