Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
fabrguer

Escaping {} in blog posts

Question

Hi there, I'm adding Latex equations to my blog posts using MathJax. It kinda works. 

I noticed that if I click "edit" and access the "edit post" window to make a change (eg update a tag) the post's text will be stripped of most of braces. For example \frac{num}{den} becomes \frac. This breaks my posts and forces me to painstakingly check each of them for errors every time I need to make an edit. Note that this problem exist even if you are not using Latex... all it takes is to have a work inside braces in a text block. Interestingly I have no problems if I edit the post by clicking the post's name -- without opening the "edit post" window.

I believe that the issue is due to JSON-T trying to render the text as if it were code.

Is there a way to escape the curly brackets or disable JSON-T render?

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

Hi @fabrguer. Nice work on this. I can confirm this is an issue just as you describe. To summarize what I see:

  • Editing a blog post via the "edit" button (a.k.a., via the "dialogue text post editor" ("DTPE")) will result in the stripping of curly-brace-encapsulated-text ("CBET").
  • Editing a blog post within the context of the website (a.k.a., via the "yui3 text editor") will not strip the CBET.
  • The text will initially be saved and displayed properly on the website upon initial input. However, if the post is edited via the DTPE, the CBET will be stripped upon initialization of the block within the editor.
  • CBET will be stripped in text blocks whether the "code" format is used or not.
  • CBET will also be stripped in markdown blocks and code blocks (!)
  • Using HTML entity codes doesn't seem to help (`{` and `}`)
  • CBET will be preserved (not stripped) if the CBET contains a space that has a non-space character on both sides of it (not including the braces themselves)
  • All of the above bullets are applicable to any `text`-based collection item edited via the DTPE, but does not occur in the body of image-based collection items nor event-based collection items.
  • I personally have found no way to escape this behavior.

I would report this to Squarespace. You could provide a link to this post for more information.

Edited by brandon

If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' vote.jpg.c260784ece77aec852b0e3049c77a607.jpg (top-left)

Share this post


Link to post
  • 0

I have the very same problem.  It sucks so bad.  Any workarounds?  Someone somewhere said something like {.meta-left} or something?

What's worse is that this was working perfectly when I first started my blog. Somewhere around Summer 2019 it broke.  I contacted SquareSpace and they blew me off, saying that debugging code injection isn't supported.  Classic.  I am fairly certain that a change they made to their editor is the problem.  Classic. 

Phil
mymathteacheristerrible.com

Edited by mymathteacheristerrible

Share this post


Link to post
  • 0

See:

 

21 minutes ago, MollyCameron said:

Fixed an issue with blog posts where saving or duplicating a post that had text inside curly brackets caused the bracketed text to disappear. 

 


sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi, I'm Paul, founder of SF Digital, a specialist company building the features that Squarespace didn't include
I am a Squarespace Developer and Squarespace Circle Leader with a
strong reputation on the Squarespace Forum. I'm trusted by thousands of Squarespace users worldwide, including designers, freelancers, business owners and agencies. My extensions add capabilities to Squarespace websites around the globe. They include the Enquiry Form ExtensionDate Picker Extension and Age Verification ExtensionNeed a custom Squarespace extension? Tell me about the functionality you need. Note that some links in my posts may be affiliate links.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...