Put back the script-fix that belongs in this branch.

This commit is contained in:
Howard Stearns 2015-05-11 11:52:41 -07:00
parent 8d362ce793
commit 51a29bdba6

View file

@ -142,7 +142,9 @@ QString EntityTreeRenderer::loadScriptContents(const QString& scriptMaybeURLorTe
QUrl url(scriptMaybeURLorText);
// If the url is not valid, this must be script text...
if (!url.isValid()) {
// We document "direct injection" scripts as starting with "(function...", and that would never be a valid url.
// But QUrl thinks it is.
if (!url.isValid() || scriptMaybeURLorText.startsWith("(")) {
isURL = false;
return scriptMaybeURLorText;
}