Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: - Fixed the way I implemented adding the Base URL tag to the document when loading an HTML page in the Preview window with a set custom Base URL from STE's menus. Previously I added the `<base>` tag to the editor's source by parsing the string as HTML, to a DOM object, appending the custom tag to the live document, then serializing that modified DOM with the custom tag back to a plain HTML string, using `new XMLSerializer()`. This worked most of the time, but it was much more complicated than it needed to be, and it was actually escaping characters like `<` or `>` if they weren't part of a full HTML tag, which started to cause errors with things like arrow functions, which would turn into `>`, causing the JS to error-out. Now I am simply adding the `<base>` tag to the first unedited HTML string from the editor, then displaying that. No need to add extra parsing, as this works just as well, and better! haha Additions: - In conjunction with the previous note, Display windows created from the View menu (or keyboard shortcut) will now use the Base URL if one is present from STE's menu. I hadn't added it before this, so it was just using the default url for STE, which would be wherever STE was running from (stedit.app in production, localhost while in dev). Now the custom Base URL set by the user is followed.
- Loading branch information