mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 01:03:58 +02:00
Merge pull request #4828 from howard-stearns/inline-entity-scripts
Inline entity scripts
This commit is contained in:
commit
09d7df9ee2
1 changed files with 3 additions and 1 deletions
|
@ -142,7 +142,9 @@ QString EntityTreeRenderer::loadScriptContents(const QString& scriptMaybeURLorTe
|
||||||
QUrl url(scriptMaybeURLorText);
|
QUrl url(scriptMaybeURLorText);
|
||||||
|
|
||||||
// If the url is not valid, this must be script text...
|
// 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;
|
isURL = false;
|
||||||
return scriptMaybeURLorText;
|
return scriptMaybeURLorText;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue