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

  1. iGidas
    Posted 3 years 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.


  2. iGidas
    Posted 3 years 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>


    <?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>


    <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
    Plugin Author

    Posted 3 years ago #

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

  4. audrey.f
    Posted 3 years ago #

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

  5. abouasy
    Posted 3 years ago #

    htmlspecialchars is preferred

    this link will fix the issue


    .. @jeff plz update it

    thanks for the amazing plugin :)

  6. Jeff Starr
    Plugin Author

    Posted 3 years ago #

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

  7. abouasy
    Posted 3 years 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


    thanks @jeff in advance :)

  8. Jeff Starr
    Plugin Author

    Posted 3 years 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

  • User Submitted Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic