Menu

#318 Invalid characters in file name

open
5
2005-02-13
2004-09-30
aran
No

When generating the html files, MSDNDocumenter
attempts to create files with name which contain invalid
characters. The classes which are being documented
are C++ template classes which use '<' '>' and ':' in the
file names.

I added a new member function to MSDNDocumenter
which replaces the invalid characters.

private string GetValidFilename(string filename)
{
filename = filename.Replace("<", "%3C");
filename = filename.Replace(">", "%3E");
filename = filename.Replace(":", "%3A");
return filename;
}

I then call the function from the various GetFilenameFor
functions.

private string
GetFilenameForNamespace(string namespaceName)
{
string fileName =
GetValidFilename(namespaceName + ".html");
return fileName;
}

This seems to fix the problem however the links between
html files still use the invalid characters.

Discussion

  • Kevin Downs

    Kevin Downs - 2005-02-13

    Logged In: YES
    user_id=919791

    I am trying to get some concrete specs on the 'official' c++
    xml id string format before comitting time to fixing this...

     
  • Kevin Downs

    Kevin Downs - 2005-02-13
    • assigned_to: nobody --> kdowns
     

Log in to post a comment.