Windows live writer replacing PHP tags with < and > RRS feed

  • Question

  • I'm editing in the source Window of Windows live writer and doing something like this:

    <b title="<?php echo $variable ?>">

    When I try and post that to my blog it messes everything up and changes it to this:

    <b title="&lt;?php echo $variable ?&gt;">

    anyway to get around that?
    Saturday, May 30, 2009 3:11 AM

All replies

  • You search here for PHP TAGS in the search feature and you come up with the 2nd result pointing you here:

    And then you find out this is a PHP problem and an xml issue that has nothing to do with Wordpress or WLW...

    Basically you have either/both a PHP version and/or a libxml2 plugin that are incompatible...

    If this just started happening and everything once worked fine before, you recently had one of the two upgraded and the problem surfaced. It only effects posts added via the XML-RPC script. ie, anything not posting via wordpress and the browser (old school).

    If this has always happened... Good news... the fix is the same. Tell your host or admin or both about the problem and point them to that URL. They will upgrade one or the other or both.
    Wednesday, June 3, 2009 6:51 AM
  • I think this is a little different.  I think JordashTalon is trying to add php code to his blog post, that will execute when his post is rendered.  This is most certainly not possible.  You could try to hack up Wordpress to allow this, but it does not by default.

    A more correct, and supported way to do this is through Wordpress Shortcodes.

    -Brandon Turner [MSFT]
    Monday, June 8, 2009 2:50 AM