TagDiv Composer – btoa bug

Posted in: Newspaper
Post count: 44

Apparently there is a bug when using Greek characters and window.btoa in a raw_html component on the tagdiv composer. This issue is expected as the btoa function does not work on non latin-1 charsets. So with UTF-8 characters you need to use btoa along with some other functions as described below.

Change the following files inside the plugins/td-composer/assets/js:

js_files_for_wrapper.min.js
​js_files_for_widget.min.js

Find and replace the following:

window.btoa(a.val());

with the following:

window.btoa(unescape(encodeURIComponent(a.val())));

Server-side base64_decode works fine as I have tested on PHP 7.

Post count: 22421

Hello,
Thank you for pointing this out and for sharing your solution.

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.