From e4a374185b9d51d4585215c6088013907a14783f Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 6 Feb 2011 13:53:30 +0100 Subject: [PATCH] Comment out shebang --- src/phantomjs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/phantomjs.cpp b/src/phantomjs.cpp index 36eb09e822..8a2d209c0c 100644 --- a/src/phantomjs.cpp +++ b/src/phantomjs.cpp @@ -208,6 +208,10 @@ void Phantom::execute(const QString &fileName) } m_script = QString::fromUtf8(file.readAll()); file.close(); + + if (m_script.startsWith("#!")) { + m_script.prepend("//"); + } m_page.mainFrame()->evaluateJavaScript(m_script); }