Live Blogging
Twitter Problem (3 posts)

  1. rfran1984
    Posted 3 years ago #


    I'm using the Live Blogging plugin, and I've done this:

    On line 1354 of live-blogging.php

    $content = filter_var($post->post_content, FILTER_SANITIZE_STRING);
    Change to
    $content = filter_var($post->post_content, FILTER_SANITIZE_URL);

    To make quotes and other special characters appear correctly in tweets. However, when I make a post, the Twitter post ignores any spaces I put between words, like this:


    Is there any way I can fix this? I need to use the live-blogging plugin on Monday, and don't want any problems.

    Thanks in advance.


  2. chrisnorthwood
    Plugin Author

    Posted 3 years ago #

    Well FILTER_SANITIZE_URL strips spaces (it is used to remove characters which are invalid in a URL from a string), so that's what you'd expect.

    You probably want to leave it as FILTER_SANITIZE_STRING but instead use html_entity_decode on $content as well, i.e.,

    $content = html_entity_decode(filter_var($post->post_content, FILTER_SANITIZE_STRING));

    If that solves your issue I could look into making that default in future versions of the plugin

  3. rfran1984
    Posted 3 years ago #

    Didn't work I'm afraid. Twitter's still ignoring spaces in words.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Live Blogging
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic