ProBlog

A powerful October CMS Blog plugin. Boost your SEO with robust blogging tools by Radiantweb.

Back to ProBlog Support

paulgrafx
paulgrafx

I am still having to change this every time there is an update relating to any tag name (not slug) which contains an Apostrophe. The best option I can see to solve any issues is the use of 'json_encode' in the '_livetag.htm' file.

<?php foreach ($existing_tags as $tag): ?>
    '<?=$tag?>',
<?php endforeach ?>

to

<?php foreach ($existing_tags as $tag): ?>
    <?=json_encode($tag, JSON_HEX_APOS|JSON_HEX_QUOT)?>,
<?php endforeach ?>

So instead of the example error below

 $(document).ready(function() {
        $("#problogTags").tagit({
            availableTags: [
            'won't work',

I get this which works...

 $(document).ready(function() {
        $("#problogTags").tagit({
            availableTags: [
            "won\u0027t work",

Or can I extend the widget and implement this on a boot for class Livetag extends FormWidgetBase maybe in the query which outputs the tags list in the javascript.

Last updated

ChadStrat
ChadStrat

I am more in favor of using "`" than json_encode. seems to solve the problem.

paulgrafx
paulgrafx

Okay could that be changed in the next push?

ChadStrat
ChadStrat

yes. Just testing Literals more.

1-4 of 4