I'm working on a Drupal conversion of an existing site, so a lot of content has to be transferred over from the old site into Drupal. Most of the articles are formatted using b and i tags for bold and italics, rather than the strong and em which Drupal prefers. So none of the formatting is showing up on the articles that have been brought in so far, since the default input format (Filtered HTML) does not allow them.

Rather than have to tell the site owner to reformat all her content, I added b and i to the list of allowed tags under Filtered HTML in the input formats area of the admin. However... It doesn't appear to have worked. The bold and italics are still not showing up. I can see the tags right there in the list of allowed HTML tags, but they don't actually work in practice.

Does anyone know if there's some trick to getting tags added to an input format to actually work? Maybe something I missed doing?

Or alternatively, does anyone know if there's a relatively easy way to make global changes across a large number of nodes at once, i.e. changing all i tags to em and all b tags to strong, en masse?

Drupal version is 5.2, PHP version is 5.2.3, MySQL version is 5.0.16, and server is Apache/Linux, if that helps.

Comments

cog.rusty’s picture

Could it be a cache problem? Try clearing the cache tables. Do the b and i tags appear when you edit and save a node? If not, do they appear when you change a node to Full HTML? (Just for narrowing down the cause of the problem)

One way of converting the characters is to open the database dump with a text editor and run a global search and replace. Or use sed. If you have non-English characters watch out for Unicode compatibility of the editor. If the database dump is too big you could use separate database dumps of the content tables (node revisions, comments, forums, special module content). Doing this in a testing database first sounds like a good idea.

spidersilk’s picture

  1. Caching is currently disabled.
  2. The b and i tags are there in the edit window, in the code, if I go to edit a node, but they have no effect once the node is saved.
  3. Change the input mode to full HTML and re-saving does work -- I was just hoping not to have to go through and do that to every node... It just seems weird that adding them to the list of approved tags has no effect.
  4. If I can't find any other solution, I'll try the database dump method. It would be pretty much only the nodes table, so I guess it wouldn't be too bad doing it that way. It just seems like there should be some way to get the tags to work properly...
cog.rusty’s picture

Caching is currently disabled.

From what I have been reading in forum posts, don't rely on this. Truncating all the 'cache' and 'cache_something' tables in the database may be worth a try.

spidersilk’s picture

That did it! Specifically, emptying the cache_content table. Thank you!

cog.rusty’s picture

Interesting. That one is created by CCK.