XML sourcecode will be deleted all the time

  • Author
    Posts
  • #939700

    jenskalski
    Member

    Hi, I’m new and I try to blog a XML-file between [sourcecode language="xml"] and [/sourcecode] but it will be deleted all the time in the visual editor.
    Blog url: http://jenskalski.wordpress.com/

    The blog I need help with is jenskalski.wordpress.com.

    #939846

    timethief
    Member

    I don’t post source code, so I apologize, in advance, if this reference link is not to helpful information > http://en.support.wordpress.com/code/posting-source-code/

    #939857

    jenskalski
    Member

    Hello timethief, I’ve got the information about the sourcecode-tag from your link. I will post a lot of sourcecode in the future (html,xml,powershell) and it would be very annoying if every time I use this shortcodes WordPress will delete the code.

    #939858

    timethief
    Member

    Hello again,
    As I indicated above I’m no coder and I hope what I posted will help you. If you don’t think it does help, and you think there’s some technical issue or a bug then I can flag this thread for Staff attention. Please let me know if you want me to do that.

    #939868

    jenskalski
    Member

    Good question. :-)

    If it is a bug, I think the only persons with a solution are the specialists from WordPress.

    Thanks for your help!

    #939871

    timethief
    Member

    I’ve flagged this thread for Staff attention.

    #939963

    macmanx
    Staff

    Would you please post the desired code here? Make sure that you place it between backticks: `

    #939967

    jenskalski
    Member
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    	<startup useLegacyV2RuntimeActivationPolicy="true">
    		<supportedRuntime version="v4.0.30319"/>
    		<supportedRuntime version="v3.5"/>
    		<supportedRuntime version="v3.0"/>
    		<supportedRuntime version="v2.0.50727"/>
    	</startup>
    </configuration>

    This is a .NET-program-configurationfile. It makes it possible, that for example the windows powershell can use .NET 4.0 instead of 2.0.

    #939969

    macmanx
    Staff

    Try this, it seemed to work fine for me:

    [sourcecode language="xml"]
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    	<startup useLegacyV2RuntimeActivationPolicy="true">
    		<supportedRuntime version="v4.0.30319"/>
    		<supportedRuntime version="v3.5"/>
    		<supportedRuntime version="v3.0"/>
    		<supportedRuntime version="v2.0.50727"/>
    	</startup>
    </configuration>
    [/sourcecode]
    #939970

    jenskalski
    Member

    Sorry, but it does not work. When I paste it in the article in HTML-mode and switch to Visual-mode it shows nothing. Switching back to HTML-mode it shows

    [sourcecode language="xml"]
    <!--?xml version="1.0" encoding="utf-8" ?-->
    
    [/sourcecode]

    #939971

    macmanx
    Staff

    Try not switching.

    Post it in the HTML editor tab, then save. That should work.

    The Visual editor is designed to clean up code and filter out certain harmful code, so if you’re posting source code, it’s best to stick to the HTML editor tab.

    #939972

    jenskalski
    Member

    I have found the problem. Sorry for all!

    It is the NoScript-Addon for Firefox. I don’t know why it is making such problems because all WordPress-Sites are marked as secure but it is definitely no WordPress-Problem.

    Again: Sorry!

    #939973

    jenskalski
    Member

    It isn’t NoScript. >:-(

    #939974

    jenskalski
    Member

    I have now tested with Firefox13 and IE9 with and without scriptblocker. It is definitely the visual-mode. It deletes the sourcecode.

    I will test it with other sourcecode like powershell.Maybe it’s only XML?

    #939975

    jenskalski
    Member

    Other sourcecode works, XML does not…

    #939976

    macmanx
    Staff

    Yes, as mentioned above, try saving it in the HTML tab without switching.

    The Visual editor is designed to clean up code and filter out certain harmful code, so if you’re posting source code, it’s best to stick to the HTML editor tab.

The topic ‘XML sourcecode will be deleted all the time’ is closed to new replies.