Skip to content
This repository has been archived by the owner on Oct 9, 2018. It is now read-only.

Context Menu - data-webworks-context breaks down when your Header or Subheader has a " in it #758

Closed
bearisgaming opened this issue Mar 20, 2013 · 3 comments
Labels

Comments

@bearisgaming
Copy link

When a list or other item autogenerates context menus for each item it adds a data-webworks-context item to itself that contains most of the data in the node. However because this is JSON encoded with " " surrounding the field, the text in the either the title or body of the node cannot contains a ". This breaks the field's string and it no longer parses as valid JSON and execution stops and the context menu does not appear to be correctly bound.

So for example I couldn't have the following text -

Bob said "BBui.js is fun".

Or more usefully -

<div class="some-class">some content that has custom presentation</div>
@tneil
Copy link
Collaborator

tneil commented Mar 20, 2013

Have you tried escaping it as " instead if the quotes?

@bearisgaming
Copy link
Author

That works for the first example. However I failed at marking my code blocks right and the second is wrapped in

<div class="some-class"></div>

Which although I forced my code to use single ' for classes here it still rendered into the DOM using " around the attributes for all my tags and as a result ends up in the data-webworks-context the same way.

@tneil
Copy link
Collaborator

tneil commented Apr 1, 2013

This should now be fixed with the latest check in

@tneil tneil closed this as completed Apr 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants