Files needing to be cleaned that are inserted into the Body with the Insert module use the old, uncleaned path and file name.

Once the node is saved, it *should* update the link in the body that was created with the insert button, but this is not happening with my complicated file names.

Whatever regex expression does the updating of the links in the body area seems to miss files with spaces, dashes, etc.

It seems similar to the 2 issues below, which apparently were both committed.

www.drupal.org/node/1925298

www.drupal.org/node/1866450

The only way to work around this bug is to:

  1. add files to node
  2. save node
  3. edit node
  4. click file's Insert button
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jlongbottom’s picture

Ok after a lot of head scratching I have an admittedly simple patch that appears to work.

jlongbottom’s picture

Here is a patch for the latest dev

yuer’s picture

#1 works for me (7.x-1.0-beta4).

Thanks a lot.

ChristophWeber’s picture

Status: Active » Reviewed & tested by the community

Confirmed, #1 works for me cleanly.

Deciphered’s picture

Status: Reviewed & tested by the community » Needs work

This fix will actually break things for users who type in the path to the file manually without URL encoding the spaces and other symbols.

Deciphered’s picture

Status: Needs work » Closed (duplicate)