You are here

function en8_encode_font_faces in Bibliography Module 7.2

Same name and namespace in other branches
  1. 6.2 modules/endnote/endnote8_export.inc \en8_encode_font_faces()
  2. 6 endnote8_export.inc \en8_encode_font_faces()
  3. 7 modules/endnote/endnote8_export.inc \en8_encode_font_faces()

File

modules/endnote/endnote8_export.inc, line 36

Code

function en8_encode_font_faces(&$node) {
  $search = array(
    '<b>',
    '<i>',
    '<u>',
    '<sup>',
    '<sub>',
    '</b>',
    '</i>',
    '</u>',
    '</sup>',
    '</sub>',
  );
  $replace = array(
    '<style face="bold" font="default" size="100%">',
    '<style face="italic" font="default" size="100%">',
    '<style face="underline" font="default" size="100%">',
    '<style face="superscript" font="default" size="100%">',
    '<style face="subscript" font="default" size="100%">',
    '</sytle>',
    '</sytle>',
    '</sytle>',
    '</sytle>',
    '</sytle>',
  );
  foreach ($node as $key => $value) {
    $node->{$key} = str_ireplace($search, $replace, $value);
  }
}