Merge pull request #4828 from howard-stearns/inline-entity-scripts

Inline entity scripts
This commit is contained in:
Brad Hefta-Gaub 2015-05-11 12:25:18 -07:00
commit 09d7df9ee2

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;
}