Forums

Events Calendar
Wrong encoding of cyrillic title (3 posts)

  1. Andr1y
    Member
    Posted 5 months ago #

    Cyrillic titles displayed in the wrong encoding while editing event.

    http://wordpress.org/extend/plugins/events-calendar/

  2. hraban
    Member
    Posted 4 months ago #

    Same issue. Checked the encoding in every single file - no success, it's all UTF-8. Cyrillic description is displaying fine although title, location and url cannot display and Cyrillic text at all.
    I checked the DB as well, encoding is UTF-8. The only difference I found between description and other fields is that description attribute type in DB is text, but others are varchar(255). Changed it to text - still to success.
    Any ideas would be appreciated.

  3. hraban
    Member
    Posted 1 month ago #

    The life twisted in a way that I had to return to this plugin. This meant I had to fix the encoding problem.
    The solution is:
    Open plugins/ec_management.class.php
    Go to line 693 (actually, yours might be slightly different but still nearby as my script is customized a bit)
    You will find a line
    <td><input class="ec-edit-form-text" type="text" name="EC_title" id="EC_title" value="<?php echo htmlentities(stripslashes($event->eventTitle),ENT_QUOTES);?>" /></td>
    Replace it with
    <td><input class="ec-edit-form-text" type="text" name="EC_title" id="EC_title" value="<?= $event->eventTitle ?>" /></td>
    Do the same with locaion and address.
    This will cause a small secutity breach. If you are the only person adding events and ordinary users cannot do that, then you are fine. If (like in my case) everyone can submit an event for moderation (that's one more feature the plugin lacks so I had to do it myself), then be sure to check every single string you add to the database.

Reply

You must log in to post.

About this Plugin

About this Topic