By: Walter
Date: 2014-07-23
Time: 19:02
|
error escaping quotes in TBS tags in docx/xlsxHello,
I am building some templates using the latest TBS + OpenTBS. So far, almost everything works, except that if I use quotes in tags (for example in IFs) they get expanded by Word/OpenOffice to ' and this is not recognized by TBS parser. This is an example of such a tag: [onshow.site_name;if [val]='';then 'all sites';else [val]] by looking at XML, this is [onshow.site_name;if [val]='';then 'all sites';else [val]] of course this break things alot. I've corrected this by modifying the source of OpenTBS 1.9.0. Moreover the substitution of ' was not applied to xlsx, and it was applied in the wrong places, so These are the mods: around line 1719: (add search for "'" )
Hope this can help someone |
|||
By: Skrol29
Date: 2014-07-23
Time: 19:10
|
Re: error escaping quotes in TBS tags in docx/xlsxHi Walter,
Thank you for sharing this. I have a trick to not be bothered with quotes replaced by apostrophes in Ms Word : after pressing key Quote (') , I do a [Ctrl]+[Z]. This put back to apostrophe to simple quote. Does it work for you? |
|||
By: Walter
Date: 2014-07-23
Time: 19:14
|
Re: error escaping quotes in TBS tags in docx/xlsxHi Scrol29,
Thanks for replying I don't use MSWord 9even if we have it), we are on Mac and we prefer OpenOffice. That said, the templates we are using should be editable by virtual anyone, so I'd say it's unsafe to rely on this trick, even if this should work.. BTW thanks for TBS. It's very nice and powerful with OpenTBS. Where can I post a question over Aggregate? |
|||
By: Skrol29
Date: 2014-08-02
Time: 12:12
|
Re: error escaping quotes in TBS tags in docx/xlsxDid you read the pat of the documentation about apostrophes ?
http://www.tinybutstrong.com/opentbs.php?doc#misc |
|||
By: Walter
Date: 2014-08-04
Time: 11:20
|
Re: error escaping quotes in TBS tags in docx/xlsxHi,
I've tried setting $TBS->OtbsConvertApostrophes = false; But everything breaks (if I don't implement my modification). Here are some errors..: a field like this, where I've inputed single quotes..
generates a struct like this
So I am afraid but, apart from CTRL-Z which, as I wrote, is not a viable solution (if any) I don't seem to get around this problem. Even more than XLSX did not get apostrophes subst at the right pass.. I've put all my code in a neat IF($TBS->OtbsEscapeApostrophes.. ) should you b e interested. Thanks |