Changeset 6936


Ignore:
Timestamp:
2004-03-05T12:19:28+13:00 (20 years ago)
Author:
jrm21
Message:

remove html tags from the "pagetitle" macro, since it isn't valid for
html <title>...</title> (and it renders ugly in the browser window title)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/documentaction.cpp

    r6811 r6936  
    816816      text_t pagetitle;
    817817      joinchar (pagetitlearray, ": ", pagetitle);
     818      // remove html tags from the title
     819      text_t::iterator open_tag=pagetitle.begin();
     820      while (open_tag < pagetitle.end()) {
     821    if (*open_tag == '<') {
     822      text_t::iterator close_tag=open_tag+1;
     823      text_t::iterator donechar=pagetitle.end();
     824      while (close_tag < donechar) {
     825        if (*close_tag == '>')
     826          break;
     827        ++close_tag;
     828      }
     829      if (close_tag < donechar) // remove this html tag, replace with space
     830        *close_tag=' ';
     831      pagetitle.erase(open_tag, close_tag);
     832    }
     833    ++open_tag;
     834      }
    818835      disp.setmacro ("pagetitle", "document", pagetitle);
    819836
Note: See TracChangeset for help on using the changeset viewer.