mirror of
https://github.com/fadden/6502bench.git
synced 2025-01-07 06:30:52 +00:00
Replace '#' with '_' in .html filename
If you link to the file without escaping the '#', the browser will think it's an anchor inside the page. Easier on everyone to just alter the filename.
This commit is contained in:
parent
6d886ecc3a
commit
94a7f2e8fb
@ -312,6 +312,11 @@ namespace SourceGen.WpfGui {
|
|||||||
private void Finish(string fileFilter, string fileExt) {
|
private void Finish(string fileFilter, string fileExt) {
|
||||||
Debug.Assert(mProjectFileName == Path.GetFileName(mProjectFileName));
|
Debug.Assert(mProjectFileName == Path.GetFileName(mProjectFileName));
|
||||||
string initialName = Path.GetFileNameWithoutExtension(mProjectFileName) + fileExt;
|
string initialName = Path.GetFileNameWithoutExtension(mProjectFileName) + fileExt;
|
||||||
|
if (GenType == GenerateFileType.Html) {
|
||||||
|
// Can't link to a file with an unescaped '#' -- the browser will think
|
||||||
|
// it's an anchor.
|
||||||
|
initialName = initialName.Replace('#', '_');
|
||||||
|
}
|
||||||
|
|
||||||
SaveFileDialog fileDlg = new SaveFileDialog() {
|
SaveFileDialog fileDlg = new SaveFileDialog() {
|
||||||
Filter = fileFilter + "|" + Res.Strings.FILE_FILTER_ALL,
|
Filter = fileFilter + "|" + Res.Strings.FILE_FILTER_ALL,
|
||||||
|
Loading…
Reference in New Issue
Block a user