WordPress.org

Ready to get started?Download WordPress

Forums

User Submitted Posts
[resolved] Weird characters in category names (8 posts)

  1. iGidas
    Member
    Posted 1 year ago #

    Hello. I have category named with Lithuanian symbols "Pastatų žvarai". In plugin option page it's encoded with weird characters. How can I change that?

    I found a workaround for similar problem here: http://wordpress.org/support/topic/plugin-user-submitted-posts-national-characters-not-recognized-for-autfor-name?replies=3

    But I don't know there to change code for categories encoding.

    http://wordpress.org/extend/plugins/user-submitted-posts/

  2. iGidas
    Member
    Posted 1 year ago #

    Never mind :D

    Just found workaround by myself.
    Change these lines:

    in user-submitted-posts/views/submission-form.php
    <?php $category = get_category($categoryId); echo htmlentities($category->name); ?></option>

    to

    <?php $category = get_category($categoryId); echo htmlentities($category->name, ENT_QUOTES, "UTF-8"); ?></option>

    and in user-submitted-posts/user-submitted-posts.php
    <span><?php echo htmlentities($category->name); ?></span>

    to

    <span><?php echo htmlentities($category->name, ENT_QUOTES, "UTF-8"); ?></span>

    Please update plugin, to fix this problems. And I think that all lines with htmlentities need to be changed with UTF-8 encoding. ;)

  3. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks iGidas - will get this fixed up for the next update :)

  4. audrey.f
    Member
    Posted 1 year ago #

    Thanks, everything works ok.
    Ačiū ;)

  5. abouasy
    Member
    Posted 1 year ago #

    htmlspecialchars is preferred

    this link will fix the issue

    http://stackoverflow.com/questions/46483/htmlentities-vs-htmlspecialchars

    .. @jeff plz update it

    thanks for the amazing plugin :)

  6. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Hi abouasy, yes this is on the list for the next update. Thank you :)

  7. abouasy
    Member
    Posted 1 year ago #

    i sent you message with below , i hope it is simple request >>

    can you display the uploaded images inside the post ,,

    for example

    <img class="attachment-medium" alt="logo" src="http://localhost/wp-content/uploads/2013/05/logo.png" width="130" height="137" />

    so in case the post include many image the admin can chose which one should be the feature image

    this plugin add the image inside the post and NOT set it as feature image

    http://wordpress.org/extend/plugins/post-from-site/

    thanks @jeff in advance :)

  8. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Hi abouasy, I may be doing something similar, but not making any promises at this point. The list is already a mile long, so I'll do what I can. Thanks for the ideas.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic