+RETURNS:
+The string containing the processed filename
+
+REMARKS:
+This routine searches through the text of the filename for variables contained
+in % percent signs
+****************************************************************************/
+wxString ParseFilename(
+ wxString &text)
+{
+ int f = 0;
+ int e;
+ while ((f = text.find('%', f)) != wxString::npos) {
+ f++;
+ e = text.find('%', f);
+#ifdef CHECKED
+ if (e == wxString::npos) {
+ wxMessageBox(wxString("wxHTML #include error: % signs should bracket variable names in file attribute. To use a percent sign in a filename write double percents (%%)."), "Error" ,wxICON_ERROR);
+ return text;
+ }
+#endif
+ if (e == f)
+ text.replace(f-1, 2, "%");
+ else {
+ wxString varname = text.Mid(f, (e-f));
+ text.replace(f-1, (e-f)+2, wxEchoVariable::GetValue(varname));
+ }
+ }
+ return text;
+}