Forums

[resolved] [Plugin: Manageable] editing post truncates title with a double-quote (3 posts)

  1. cabraham
    Member
    Posted 1 year ago #

    If you use manageable to edit a post whose contains a double-quote, the title will be truncated before that point.

  2. aaron_guitar
    Member
    Posted 1 year ago #

    Yeah, I need to fix that.

  3. cabraham
    Member
    Posted 1 year ago #

    I fixed it. Just escaped the title with htmlspecialchars. See:

    Index: wp-content/plugins/manageable/manageable.php
    ===================================================================
    --- wp-content/plugins/manageable/manageable.php (revision 20741)
    +++ wp-content/plugins/manageable/manageable.php (working copy)
    @@ -197,7 +197,7 @@
    case 'title': ?>
    <td<?php if($type == 'page'): ?> class="page-title"<?php endif; ?>>
    <div class="title">
    - <input type="text" id="title-<?php echo $post->ID ?>" value="<?php echo $post->post_title ?>" />
    + <input type="text" id="title-<?php echo $post->ID ?>" value="<?php echo htmlspecialchars($post->post_title) ?>" />
    <label><?php _e('Slug'); ?></label><input type="text" id="slug-<?php echo $post->ID ?>" value="<?php echo $post->post_name ?>" class="slug" />
    </div>
    <?php if($type == 'page'): ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags