Changeset 54228 in webkit


Ignore:
Timestamp:
Feb 2, 2010 4:59:58 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-02-02 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Display HTML tags verbatim in JS alert/confirm/prompt boxes

https://bugs.webkit.org/show_bug.cgi?id=34429

  • Api/qwebpage.cpp: (QWebPage::javaScriptAlert): (QWebPage::javaScriptConfirm): (QWebPage::javaScriptPrompt):
Location:
trunk/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r53956 r54228  
    106106#include <QSysInfo>
    107107#include <QTextCharFormat>
     108#include <QTextDocument>
    108109#include <QNetworkAccessManager>
    109110#include <QNetworkRequest>
     
    18721873    Q_UNUSED(frame)
    18731874#ifndef QT_NO_MESSAGEBOX
    1874     QMessageBox::information(view(), tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Ok);
     1875    QMessageBox::information(view(), tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Ok);
    18751876#endif
    18761877}
     
    18881889    return true;
    18891890#else
    1890     return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Yes, QMessageBox::No);
     1891    return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Yes, QMessageBox::No);
    18911892#endif
    18921893}
     
    19071908    bool ok = false;
    19081909#ifndef QT_NO_INPUTDIALOG
    1909     QString x = QInputDialog::getText(view(), tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), msg, QLineEdit::Normal, defaultValue, &ok);
     1910    QString x = QInputDialog::getText(view(), tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QLineEdit::Normal, defaultValue, &ok);
    19101911    if (ok && result)
    19111912        *result = x;
  • trunk/WebKit/qt/ChangeLog

    r54222 r54228  
     12010-02-02  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Display HTML tags verbatim in JS alert/confirm/prompt boxes
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=34429
     8
     9        * Api/qwebpage.cpp:
     10        (QWebPage::javaScriptAlert):
     11        (QWebPage::javaScriptConfirm):
     12        (QWebPage::javaScriptPrompt):
     13
    1142010-02-02  Noam Rosenthal  <noam.rosenthal@nokia.com>
    215
Note: See TracChangeset for help on using the changeset viewer.