The MU forums have moved to WordPress.org

Imports and YouTube embed codes (11 posts)

  1. chinocharles
    Member
    Posted 14 years ago #

    When importing a Wordpress blog via XML, YouTube embed codes are just stripped from posts. The object tags are in the XML file, but after being imported the codes are gone from the post HTML. Is there any workaround for this, or at least a fix planned for this issue? I've seen similar problems on the WP forums with the import process replacing embeds with a [youtube=x] style tag and there is a plugin that will fix that, but there is no obvious fix for what I'm running into.

  2. ferrouswheel
    Member
    Posted 14 years ago #

    I have the same issue.

    You'd think writing an importer that avoided losing information wouldn't be that hard... even if the info was escaped. Letting information be lost during the import is poor form.

  3. andrea_r
    Moderator
    Posted 14 years ago #

    It's MU. It strips the code from posts unless you have a plugin to handle it. the trick is to put the plugin in there *first* and then import.

  4. tdjcbe
    Member
    Posted 14 years ago #

    There is a plugin to fix that? Would love a link to it please.

  5. kgraeme
    Member
    Posted 14 years ago #

    Same here. AFAIK the unfiltered-mu plugin doesn't help during imports.

    Core enhancement / plugin idea:

    Default blog admin behavior:
    During user initiated import, when the process encounters code that would be stripped out, it suspends the process and displays a dialog informing the user that due to security policies that data such as embeds and scripts will be lost during import. They then have the option of cancelling or continuing. If they continue, when import is complete the user is then given a manifest of what was stripped out. If they cancel, they have the option of requesting a manifest to see what needs to be changed pre-import.

    This should give them a bit more opportunity to then edit the posts to add the features back in using Site Admin approved plugins.

    Default site admin behavior:
    During site admin initiated import, when the process encounters code that would be stripped out, it suspends the process and displays a dialog which provides the option to keep the content, strip the content, or cancel the import.

    Site Admin options settings:
    - Checkbox toggle to allow users to keep content during import.
    - Checkbox toggle to email site admin when a user imports a site with potentially harmful code.

    Additional core/plugin enhancements required:
    Unfiltered-mu updated to NOT strip code when switching between visual and html editors.

    Add site-admin menu.
    - checkbox to select which roles are unfiltered
    - text input to add usernames for user-specific unfiltered (similar to how site-admins are added)

    ---

    Thoughts? I personally see these as core enhancements rather than plugins because of the amount of hooks necessary. Opinions on that? If so, thoughts on which Trac to request them in?

  6. andrea_r
    Moderator
    Posted 14 years ago #

    "Unfiltered-mu updated to NOT strip code when switching between visual and html editors."

    Actually, this has been a problem even without it, and in single WP.

    Ans yes, I have tossed in the unfilteredmu, then imported. That was a while ago tho.

    Faved so I can find it again & bring it up to those who Need To Know. ;)

  7. kgraeme
    Member
    Posted 14 years ago #

    Andrea, thoughts on core or plugin? Even if it's partially a plugin, it would need a fair amount of core function changes and action hooks to make it work.

    I'm generally against the concept of the canonical plugins, but because this really is so closely tied to core functionality I might be willing to consider this one a candidate.

  8. andrea_r
    Moderator
    Posted 14 years ago #

    you did read matt's comments on canonical plugins? It's an experiment, there's only 3 on the table. see wptavern.com, I know Jeff wrote a post today/yesterday about it.

    I did mention this issue to Ron briefly over dinner tho. :) I know he heard me, because he said "uh-huh" but then he started thinking. :D

  9. taewoo
    Member
    Posted 14 years ago #

    @kgraeme: I've noticed the the plugin doesn't help either.. any update for us?

  10. taewoo
    Member
    Posted 14 years ago #

    ok i found a hack that seems to work

    Solved it by adding the following under ‘allowedposttags = array’ in kses.php:

    'object' => array (
    'id' => array (),
    'classid' => array (),
    'data' => array (),
    'type' => array (),
    'width' => array (),
    'height' => array (),
    'allowfullscreen' => array ()),
    'param' => array (
    'name' => array (),
    'value' => array ()),
    'embed' => array (
    'id' => array (),
    'style' => array (),
    'src' => array (),
    'type' => array (),
    'height' => array (),
    'width' => array (),
    'quality' => array (),
    'name' => array (),
    'flashvars' => array (),
    'allowscriptaccess' => array (),
    'allowfullscreen' => array ()),
    'script' => array (
    'type' => array ()),

  11. taewoo
    Member
    Posted 14 years ago #

    another forum thread about this

About this Topic

  • Started 14 years ago by chinocharles
  • Latest reply from taewoo