Comments (6)
My bad; I closed this by mistake. It's still an issue. (The Close button is next to the window for adding a new comment so I thought it would close that, not close my issue!)
from tyto.
Hey @edemond-clarity ,
Have only just seen this. Will have to have a look when I get a minute. I can only imagine, it's some kind of encoding issue that needs a piece of regex to pick up on #. Because # wouldn't invalidate the json.
Seems a little strange.
Thanks for issuing ;)
from tyto.
Right so had a quick look at this and actually thinking about this it kinda makes sense now.
The way in which the export works is by clicking an invisible anchor tag with the href set to the json content.
Because #
is a special character in the href
property of an anchor tag, that's why it's cutting off the content. The json being generated is fine but what will have to be done is I'll have to actually write a replace encoding of my own just for the #
character.
So I think when export I'll do something like replace with @tyto-hash and then when importing, just change that back out to #.
from tyto.
So I spent a few moments and fixed this up for you.
I've added in an object that manages escapes and their used defined equivalents.
tyto.prototype._escapes = {
"#": "@tyto-hash"
}
Then before exporting and importing a new function is run that will encode or decode the string approriately with those user defined escapes.
tyto.prototype._decodeJSON = function(jsonString) {
var escape, regex;
tyto = this;
if (jsonString !== undefined) {
for (escape in tyto._escapes) {
regex = new RegExp(tyto._escapes[escape], 'g');
jsonString = jsonString.replace(regex, escape);
}
}
return jsonString;
};
This seems to fix it. I'll upload to the pages branch too.
Thanks for raising this!
from tyto.
Thanks, appreciate you looking into it -- works great!
from tyto.
No problem, anytime.
The solution should be pretty reliable and can use the mechanics of it for some of the future features hopefully.
from tyto.
Related Issues (20)
- feature request: allow to change color of notes HOT 3
- Bug: Undo move column
- Mobile view HOT 1
- MongoDB option HOT 6
- Track changes in boards HOT 1
- Time tracking on tasks?
- Move over to gulp HOT 1
- Change implementation to MVC framework HOT 1
- Markdown edit support
- No option to Add/Create a board HOT 6
- Board not available in other browser HOT 1
- Improvements
- Create web app manifest
- Suggestions Feature HOT 1
- Setting an empty title yields it uneditable HOT 1
- Setup Problem HOT 2
- view.ui.columnContainer.sortable is not a function
- embedding images HOT 3
- Embedded images render larger than container
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tyto.