[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove inline styles #12262

Open
nijel opened this issue May 17, 2016 · 18 comments
Open

Remove inline styles #12262

nijel opened this issue May 17, 2016 · 18 comments
Labels

Comments

@nijel
Copy link
Contributor
nijel commented May 17, 2016

Inline stying doesn't play well with themes and also forces us to use permisive Content-Security-Policy.

The styling should be moved completely to themes and after this is done the CSP should remove 'unsafe-inline' for styles.

@nijel nijel added enhancement A feature request for improving phpMyAdmin newbie labels May 17, 2016
@flash1452
Copy link
Contributor

@nijel Does fixing this error include even those inline style statements that are used in some of the .js files??
And also I wanted to ask if I am allowed to use any id or class-name for those tags that have yet not been given any class or id names.

@nijel
Copy link
Contributor Author
nijel commented May 17, 2016

Yes to both answers. The definite goal is to remove inline usage from Conent-Security-Policy.

@nijel
Copy link
Contributor Author
nijel commented May 18, 2016

Also this doesn't have to be done all in one step, incremental patches are welcome!

andavies pushed a commit to andavies/phpmyadmin that referenced this issue May 26, 2016
…of issue phpmyadmin#12262)

Signed-off-by: Andy Davies <contact@andy-davies.me>
andavies pushed a commit to andavies/phpmyadmin that referenced this issue May 26, 2016
…of issue phpmyadmin#12262)

Signed-off-by: Andy Davies <contact@andy-davies.me>
nijel referenced this issue May 27, 2016
Remove inline styles from elements with id='filterText' (partial fix …
clancelotti added a commit to clancelotti/phpmyadmin that referenced this issue Dec 17, 2016
…data'(partial fix of issue phpmyadmin#12262)

Signed-off-by: Cristiano Lancelotti <lancelot.info@gmail.com>
clancelotti added a commit to clancelotti/phpmyadmin that referenced this issue Dec 20, 2016
…data'(partial fix of issue phpmyadmin#12262)

Signed-off-by: Cristiano Lancelotti <lancelot.info@gmail.com>
@emanuelb
Copy link

here list of style attribute usage: (use class or css via id instead)

./gis_data_editor.php:echo '<div id="placeholder" style="width:450px;height:300px;'
./gis_data_editor.php:echo '<div id="openlayersmap" style="width:450px;height:300px;'
./gis_data_editor.php:echo '<div class="choice" style="float:right;clear:right;">';
./index.php:        echo '<p style="margin: 0.5em 1em 0.5em 1em">';
./prefs_manage.php:            <div class="click-hide-message group-cnt" style="display:none">
./prefs_manage.php:                <div style="padding-bottom:0.5em">
./templates/error/report_form.twig:    <fieldset style="padding-top:0">
./templates/columns_definitions/column_name.phtml:    <p style="font-size:80%;margin:5px 2px"
./templates/database/designer/having_query_panel.twig:<table id="query_having" style="display:none;" width="5%" cellpadding="0" cellspacing="0">
./templates/database/designer/aggregate_query_panel.twig:<table id="query_Aggregate" style="display:none;" width="5%" cellpadding="0" cellspacing="0">
./templates/database/designer/side_menu.phtml:    <div id="name-panel" style="overflow:hidden">
./templates/database/designer/side_menu.phtml:        <span id="page_name" style="border:none">
./templates/database/designer/side_menu.phtml:        <span id="saved_state" style="border:none">
./templates/database/designer/database_tables.phtml:           style="position:absolute; left:<?= (isset($tab_pos[$t_n])
./templates/database/designer/database_tables.phtml:                               style="margin: 0;"
./templates/database/designer/database_tables.phtml:        <tbody id="id_tbody_<?= $t_n_url; ?>" style="<?= (isset($tab_pos[$t_n]) && empty($tab_pos[$t_n]["V"])) ? 'display: none' : ''; ?>">
./templates/database/designer/database_tables.phtml:                                   style="margin: 0;"
./templates/database/designer/new_relation_panel.twig:<table id="layer_new_relation" style="display:none;" width="5%" cellpadding="0" cellspacing="0">
./templates/database/designer/delete_relation_panel.twig:<table id="layer_upd_relation" style="display:none;" width="5%" cellpadding="0" cellspacing="0">
./templates/database/designer/table_list.phtml:<div id="layer_menu" style="display:none;">
./templates/database/designer/table_list.phtml:        <table width="100%" style="padding-left: 3px;">
./templates/database/designer/table_list.phtml:                               style="margin:0;"
./templates/database/designer/rename_to_panel.twig:<table id="query_rename_to" style="display:none;" width="5%" cellpadding="0" cellspacing="0">
./templates/database/designer/query_details.phtml:    <div style="clear:both;">
./templates/database/designer/query_details.phtml:    <div style="clear:both;">
./templates/database/designer/options_panel.twig:<table id="pmd_optionse" style="display:none;" width="5%" cellpadding="0" cellspacing="0">
./templates/database/designer/where_query_panel.twig:<table id="query_where" style="display:none;" width="5%" cellpadding="0" cellspacing="0">
./templates/database/structure/check_all_tables.phtml:    <select name="submit_mult" style="margin: 0 3em 0 3em;">
./templates/div_for_slider_effect.twig:        style="display: none; overflow:auto;"{% endif %} class="pma_auto_slider"
./templates/privileges/require_options.phtml:                <div id="specified_div" style="padding-left:20px;">
./templates/server/databases/table_row.phtml:        <td class="tool" style="text-align: center;">
./templates/server/databases/table_row.phtml:        <td class="tool" style="text-align: center;">
./templates/server/variables/link_template.phtml:<a style="display: none;" href="<?= $url; ?>" class="ajax saveLink">
./templates/server/variables/link_template.phtml:<a style="display: none;" href="#" class="cancelLink">
./templates/table/gis_visualization/gis_visualization.phtml:        <div id="gis_div" style="position:relative;">
./templates/table/gis_visualization/gis_visualization.phtml:            <div class="pma_quick_warp" style="width: 50px; position: absolute; right: 0; top: 0; cursor: pointer;">
./templates/table/gis_visualization/gis_visualization.phtml:                    <span class="drop_button" style="padding: 0; border: 0;">
./templates/table/gis_visualization/gis_visualization.phtml:        <div style="clear:both;">&nbsp;</div>
./templates/table/gis_visualization/gis_visualization.phtml:             style="width:<?= htmlspecialchars($visualizationSettings['width']); ?>
./templates/table/structure/move_columns_dialog.phtml:<div id="move_columns_dialog" title="<?= __('Move columns'); ?>" style="display: none">
./templates/table/structure/optional_action_links.phtml:            ); ?>" style="margin-right: 0;">
./templates/table/chart/tbl_chart.phtml:                <span class="span_pie" style="display:none;">
./templates/table/chart/tbl_chart.phtml:                <span class="span_timeline" style="display:none;">
./templates/table/chart/tbl_chart.phtml:                <span class="span_scatter" style="display:none;">
./templates/table/chart/tbl_chart.phtml:                <span class="barStacked" style="display:none;">
./templates/table/chart/tbl_chart.phtml:                <input style="margin-top:0;" type="text" name="xaxis_label"
./templates/table/chart/tbl_chart.phtml:            <p style="clear:both;">&nbsp;</p>
./templates/table/chart/tbl_chart.phtml:            <p style="clear:both;">&nbsp;</p>
./templates/table/chart/tbl_chart.phtml:            <div id="resizer" style="width:600px; height:400px;">
./templates/table/chart/tbl_chart.phtml:                <div style="position: absolute; right: 10px; top: 10px; cursor: pointer; z-index: 1000;">
./templates/table/search/options.phtml:<br style="clear: both;" />
./templates/table/search/zoom_result_form.phtml:                    <div id="querydata" style="display:none">
./templates/table/search/zoom_result_form.phtml:        <div id="dataDisplay" style="display:none">
./templates/prefs_autoload.twig:<div id="prefs_autoload" class="notice print_ignore" style="display:none">
./templates/select_all.twig:<i style="margin-left: 2em">{% trans 'With selected:' %}</i>
./themes/svg_gradient.php:    <rect width="100%" height="100%" style="fill:url(#linear-gradient);" />
./libraries/Util.php:                . ' style="text-align: ' . $GLOBALS['cell_align_left'] . '"'
./libraries/Util.php:                     . ' method="post"' . $target . ' style="display: inline;">';
./libraries/Util.php:                $selected = 'selected="selected" style="font-weight: bold"';
./libraries/Util.php:            . '<div id="upload_form_status" style="display: none;"></div>'
./libraries/Util.php:            . '<div id="upload_form_status_info" style="display: none;"></div>'
./libraries/Util.php:                . '    <select style="margin: 5px" size="1" '
./libraries/config/FormDisplay.tpl.php:            . '" style="display:none">' . $icons['edit'] . '</a>';
./libraries/config/FormDisplay.tpl.php:            .  __('Restore default value') . '" style="display:none">'
./libraries/sql.lib.php:        $profiling_table .= '<div id="profilingChartData" style="display:none;">';
./libraries/sql.lib.php:        $profiling_table .= '<div id="profilingchart" style="display:none;">';
./libraries/sql.lib.php:            . 's<span style="display:none;" class="rawvalue">'
./libraries/sql.lib.php:            . 's<span style="display:none;" class="rawvalue">'
./libraries/sql.lib.php:            . 's<span style="display:none;" class="rawvalue">'
./libraries/DbQbe.php:        $html_output .= '<select style="width: ' . $this->_realwidth
./libraries/DbQbe.php:                    . ' style="width: ' . $this->_realwidth . '"'
./libraries/DbQbe.php:                . ' style="width: ' . $this->_realwidth . '"'
./libraries/DbQbe.php:                    . ' style="width: ' . $this->_realwidth . '" size="20" />';
./libraries/DbQbe.php:                . ' style="width: ' . $this->_realwidth . '" size="20" />';
./libraries/DbQbe.php:        $html_output .= '<table class="data" style="width: 100%;">';
./libraries/DbQbe.php:        $html_output .= '<div class="floatleft" style="width:50%">';
./libraries/navigation/Navigation.php:                        $html .= '<td style="width:80px"><a href="navigation.php'
./libraries/server_status_variables.lib.php:        $retval .= '<span style="display:none;" class="original">';
./libraries/server_status_advisor.lib.php:    $output .= '<div id="advisorInstructionsDialog" style="display:none;">';
./libraries/server_status_advisor.lib.php:    $output .= '<div id="advisorData" style="display:none;">';
./libraries/tracking.lib.php:        <th style="width: 300px"><?php echo __('Table');?></th>
./libraries/central_columns.lib.php:    $table_navigation_html = '<table style="display:inline-block;max-width:49%" '
./libraries/central_columns.lib.php:        . '<th class="" style="display:none"></th>'
./libraries/central_columns.lib.php:        . ' style="min-width: 100%;">';
./libraries/central_columns.lib.php:    $columnAdd = '<table style="display:inline-block;margin-left:1%;max-width:50%" '
./libraries/central_columns.lib.php:        . '<td style="padding:1.5% 0em">'
./libraries/central_columns.lib.php:        . '<td id="save_' . $row_num . '" style="display:none">'
./libraries/rte/rte_export.lib.php:            $export_data = '<textarea cols="40" rows="15" style="width: 100%;">'
./libraries/index.lib.php:    $html_output .= '<fieldset class="tblFooters print_ignore" style="text-align: '
./libraries/replication_gui.lib.php:        $html .= ' <div id="slave_control_gui" style="display: none">';
./libraries/replication_gui.lib.php:    $html .= ' <div id="slave_errormanagement_gui" style="display: none">';
./libraries/replication_gui.lib.php:    $html .= '<div id="replication_' . $type . '_section" style="';
./libraries/replication_gui.lib.php:    $html .= '  <div id="replication_slaves_section" style="';
./libraries/DatabaseInterface.php:                = '<span style="color:red">'
./libraries/display_export.lib.php:    $html .= '<div class="floatleft" style="margin-left: 50px;">';
./libraries/insert_edit.lib.php:        return '<span style="border-bottom: 1px dashed black;" title="'
./libraries/insert_edit.lib.php:        return '<span style="color:red">' . __('Error') . '</span><br />' . "\n"
./libraries/plugins/auth/AuthenticationConfig.php:    <table cellpadding="0" cellspacing="3" style="margin: 0 auto" width="80%">
./libraries/plugins/schema/dia/TableStatsDia.php:                <dia:font family="monospace" style="0" name="Courier"/>
./libraries/plugins/schema/dia/TableStatsDia.php:                <dia:font family="sans" style="80" name="Helvetica-Bold"/>
./libraries/plugins/schema/dia/TableStatsDia.php:                <dia:font family="sans" style="0" name="Helvetica"/>
./libraries/plugins/schema/dia/RelationStatsDia.php:                <dia:font family="monospace" style="0" name="Courier"/>
./libraries/server_status_monitor.lib.php:    $retval .= __('Log statistics') . '" style="display:none;">';
./libraries/server_status_monitor.lib.php:    $retval .= __('Query analyzer') . '" style="display:none;">';
./libraries/server_status_monitor.lib.php:    $retval .= __('Monitor Instructions') . '" style="display:none;">';
./libraries/server_status_monitor.lib.php:    $retval .= '<div class="monitorUse" style="display:none;">';
./libraries/server_status_monitor.lib.php:        . __('Add chart') . '" style="display:none;">';
./libraries/server_status_monitor.lib.php:    $retval .= '<span class="divisorInput" style="display:none;">';
./libraries/server_status_monitor.lib.php:    $retval .= '<span class="unitInput" style="display:none;">';
./libraries/server_status_monitor.lib.php:    $retval .= '<span id="clearSeriesLink" style="display:none;">';
./libraries/server_status_monitor.lib.php:    $retval .= '<a href="#endChartEditMode" style="display:none;">';
./libraries/display_import.lib.php:        . 'width="1" height="1" style="display: none;"></iframe>';
./libraries/display_import.lib.php:    $html .= '<div id="import_form_status" style="display: none;"></div>';
./libraries/display_import.lib.php:        . 'width="16" height="16" alt="ajax clock" style="display: none;" />';
./libraries/server_user_groups.lib.php:        $html_output .= '<th style="white-space: nowrap">'
./libraries/ErrorHandler.php:                $retval .= ' style="display:none;"';
./libraries/export.lib.php:    $html = '<div style="text-align: ' . $GLOBALS['cell_align_left'] . '">';
./libraries/server_privileges.lib.php:        . ' name="user_exists_warning" style="display:none;">'
./libraries/server_privileges.lib.php:                $html_output .= '<span style="color: #FF0000">'
./libraries/server_privileges.lib.php:                    ? '<span style="color: #FF0000">' . __('Any') . '</span>'
./libraries/server_privileges.lib.php:            $new_user_string .= '<span style="color: #FF0000">'
./libraries/server_privileges.lib.php:        . '<div class="clear_both" style="clear:both"></div>';
./libraries/server_privileges.lib.php:                    ? '<span style="color: #FF0000">' . __('Any') . '</span>'
./libraries/server_privileges.lib.php:                $html_output .= '<span style="color: #FF0000">' . __('No')
./libraries/relation.lib.php:    $messages['error'] = '<span style="color:red"><strong>'
./libraries/relation.lib.php:    $messages['ok'] = '<span style="color:green"><strong>'
./libraries/relation.lib.php:    $messages['enabled']  = '<span style="color:green">' . __('Enabled') . '</span>';
./libraries/relation.lib.php:    $messages['disabled'] = '<span style="color:red">'   . __('Disabled') . '</span>';
./libraries/DisplayResults.php:            . '<i style="margin-left: 2em">' . __('With selected:') . '</i>' . "\n";
./setup/frames/config.inc.php:echo '<td class="lastrow" style="text-align: left">';
./setup/frames/index.inc.php:echo '<a href="#" id="show_hidden_messages" style="display:none">';
./setup/frames/index.inc.php:    echo '<table cellspacing="0" class="datatable" style="table-layout: fixed">';
./setup/frames/index.inc.php:        echo '<td style="white-space: nowrap">';
./setup/frames/index.inc.php:echo '<td class="lastrow" style="text-align: left">';
./setup/frames/index.inc.php:echo '<td colspan="2" class="lastrow" style="text-align: left">';
./js/messages.php:    . '" class="floatright" style="margin-top: 20px;">'
./js/messages.php:    . '" class="floatright" style="margin-top: 20px;">'
./js/server_status_monitor.js:                ' style="width:' + chartSize.width + 'px; height:' + chartSize.height + 'px;"></div>' +
./js/server_status_monitor.js:            var tooltipHtml = '<div style="font-size:12px;background-color:#FFFFFF;' +
./js/server_status_monitor.js:            tooltipHtml += '<span style="font-weight:bold;">';
./js/server_status_monitor.js:                tooltipHtml += '<br /><span style="color:' + seriesColor + '">' +
./js/server_status_monitor.js:            var selectionBox = $('<div id="selection_box" style="z-index:1000;height:205px;position:absolute;background-color:#87CEEB;opacity:0.4;
./js/server_status_monitor.js:                        '        <input name="filterQueryText" type="text" id="filterQueryText" style="vertical-align: baseline;" />' +
./js/error_report.js:            '<div style="position:fixed;bottom:0;left:0;right:0;margin:0;' +
./js/functions.js:            fields += '<tr><td><div><span style="font-weight:bold">' +
./js/functions.js:                '</span><br><span style="color:gray">' + central_column_list[db + '_' + table][i].col_type;
./js/functions.js:                fields += '<td><input class="pick" style="width:100%" type="submit" value="' +
./js/functions.js:                        fields += '<tr><td><div><span style="font-weight:bold">' +
./js/functions.js:                            '</span><br><span style="color:gray">' +
./js/functions.js:                            fields += '<td><input class="pick" style="width:100%" type="submit" value="' +
./js/pmd/history.js:            str += '<td style="padding-left: 5px;" class="right">' + PMA_getImage('b_sbrowse.png', 'column name') + '</td>' +
./js/pmd/history.js:                '<td width="175" style="padding-left: 5px">' + history_array[i].get_column_name() + '<td>';
./js/rte.js:                data.message = '<textarea cols="40" rows="15" style="width: 100%;">' + data.message + '</textarea>';

here list of <style> tag usage: (use link to load css file instead)

./libraries/Header.php:                $retval .= '<style>html{display:block}</style>';
./libraries/Header.php:            $retval .= '<style id="cfs-style">html{display: none;}</style>';
./libraries/error.inc.php:    <style type="text/css">

@codehimanshu
Copy link
Contributor

@nijel Please let me know if the inline styles are still existing. I would like to work on it.

@MauricioFauth
Copy link
Member

@codehimanshu Thanks for the interest. There are still inline styles in some places.
Feel free to choose what you want to remove and send us a pull request.

@codehimanshu
Copy link
Contributor

@MauricioFauth I am a newbee, so I need a bit guidence.
I want to remove inline style from /js/error_report.js
var $div = $( '<div style="position:fixed;bottom:0;left:0;right:0;margin:0;' + 'z-index:1000" class="error" id="error_notification"></div>'
Should I add a class here and add this particular css in /themes/original/css/common.css.php and /themes/pmahomme/css/common.css.php?

codehimanshu added a commit to codehimanshu/phpmyadmin that referenced this issue Aug 4, 2017
Signed-off-by: codehimanshu <himanshuagrawal1998@gmail.com>
codehimanshu added a commit to codehimanshu/phpmyadmin that referenced this issue Aug 4, 2017
Signed-off-by: codehimanshu <himanshuagrawal1998@gmail.com>
MauricioFauth added a commit that referenced this issue Aug 5, 2017
@Nilucshan
Copy link

I would like to work on removing inline and i am also a newbie. I am not clear about what we are supposed to do when we remove those inline codes. Can anyone assist with this? Any help is highly appreciated.

@codehimanshu
Copy link
Contributor

@Nilucshan You can remove the inline css codes and add a class or ID to the element. Then apply the same CSS in the css files in themes/pmahomme/css/common.css.php Also check the layout on browser if poosible. Refer to any of the above PRs for help.

@stephangrobler
Copy link
Contributor

I see that the travis CI failed on the docs section of the build, is this an issue with the code I submitted?

@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Oct 25, 2018
Bournvita1998 added a commit to Bournvita1998/phpmyadmin that referenced this issue Feb 26, 2019
Refer:phpmyadmin#12262

Signed-off-by: Bournvita1998 <mohit.kuri@research.iiit.ac.in>
williamdes added a commit that referenced this issue Mar 16, 2019
#12262
Closes: #14980
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes removed the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Mar 16, 2019
GitarMan added a commit to GitarMan/phpmyadmin that referenced this issue Oct 18, 2019
…e _common.scss files; Partial fix of issue: phpmyadmin#12262

Signed-off-by: Ron Holt <holt.ronald@gmail.com>
GitarMan added a commit to GitarMan/phpmyadmin that referenced this issue Oct 18, 2019
…e _common.scss files; Partial fix of issue: phpmyadmin#12262

Signed-off-by: Ron Holt <holt.ronald@gmail.com>
GitarMan added a commit to GitarMan/phpmyadmin that referenced this issue Oct 18, 2019
…e _common.scss files; Partial fix of issue: phpmyadmin#12262

Signed-off-by: Ron Holt <holt.ronald@gmail.com>
@williamdes williamdes added this to Triage zone in Enhancements Jan 23, 2020
@williamdes williamdes moved this from Triage zone to Code base in Enhancements Jan 23, 2020
williamdes added a commit that referenced this issue Jan 27, 2020
Pull-request: #15538
Ref: #12262
Signed-off-by: William Desportes <williamdes@wdes.fr>
@emanuelb
Copy link

Results for:

Searching <style to catch <style> tag without src=:

templates/error/generic.twig:8:    <style type="text/css">
templates/header.twig:10:    <style id="cfs-style">html{display: none;}</style>
templates/header.twig:28:  <noscript><style>html{display:block}</style></noscript>

Searching style= to catch style attribute usage:

js/designer/move.js:559:        '            style="margin:0;"' +
js/designer/history.js:104:            str += '<td style="padding-left: 5px;" class="right">' + Functions.getImage('b_sbrowse', Messages.strColumnName) + '</td>' +
js/designer/history.js:105:                '<td width="175" style="padding-left: 5px">' + $('<div/>').text(historyArray[i].getColumnName()).html() + '<td>';
libraries/classes/Plugins/Export/ExportMediawiki.php:211:                $output .= '{| class="wikitable" style="text-align:center;"'
libraries/classes/Plugins/Export/ExportMediawiki.php:221:                    $output .= '|- style="background:#ffdead;"' . $this->exportCRLF();
libraries/classes/Plugins/Export/ExportMediawiki.php:222:                    $output .= '! style="background:#ffffff" | '
libraries/classes/Plugins/Export/ExportMediawiki.php:301:        $output .= '{| class="wikitable sortable" style="text-align:center;"'
libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php:229:                <dia:font family="monospace" style="0" name="Courier"/>
libraries/classes/Plugins/Schema/Dia/TableStatsDia.php:175:                <dia:font family="monospace" style="0" name="Courier"/>
libraries/classes/Plugins/Schema/Dia/TableStatsDia.php:178:                <dia:font family="sans" style="80" name="Helvetica-Bold"/>
libraries/classes/Plugins/Schema/Dia/TableStatsDia.php:181:                <dia:font family="sans" style="0" name="Helvetica"/>
libraries/classes/Html/Generator.php:1159:     *                           params (f.e. style="")
libraries/classes/Navigation/NavigationTree.php:1241:                $hide = " style='display: none;'";
libraries/classes/Database/Qbe.php:728:                    . ' style="width: ' . $this->realwidth . '"'
libraries/classes/Database/Qbe.php:762:                . ' style="width: ' . $this->realwidth . '"'
libraries/classes/Database/Qbe.php:881:                    . ' style="width: ' . $this->realwidth . '" size="20">';
libraries/classes/Database/Qbe.php:901:                . ' style="width: ' . $this->realwidth . '" size="20">';
libraries/classes/Database/Routines.php:1957:            $exportData = '<textarea cols="40" rows="15" style="width: 100%;">'
libraries/classes/Database/Events.php:609:            $exportData = '<textarea cols="40" rows="15" style="width: 100%;">'
libraries/classes/Database/Triggers.php:626:            $exportData = '<textarea cols="40" rows="15" style="width: 100%;">'
libraries/classes/InsertEdit.php:422:            return '<span style="border-bottom: 1px dashed black;" title="'
libraries/classes/InsertEdit.php:1583:            return '<span style="color:red">' . __('Error') . '</span><br>' . "\n"
libraries/classes/Util.php:1302:                $selected = 'selected="selected" style="font-weight: bold"';
js/vendor/jquery/jquery-ui-timepicker-addon.js:408:						html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
js/server/status/monitor.js:1218:                ' style="width:' + chartSize.width + 'px; height:' + chartSize.height + 'px;"></div>' +
js/server/status/monitor.js:1259:                tooltipHtml += '<br><span style="color:' + seriesColor + '">' +
js/server/status/monitor.js:2123:                explain += '<div class="explain-' + i + '"' + (i > 0 ?  'style="display:none;"' : '') + '>';
js/server/status/sorter.js:66:            var res = html.innerHTML.match(/<span(\s*style="display:none;"\s*)?\s*class="original">(.*)?<\/span>/);
templates/display/results/table.twig:107:      {{- default_sliders_state == 'closed' ? ' style="display: none; overflow:auto;"' }} class="pma_auto_slider" title="{% trans 'Options' %}"
templates/gis_data_editor_form.twig:18:        <div id="openlayersmap" style="width: {{width}}px; height: {{height}}px;"{{ srid == 0 ? ' class="hide"' }}></div>
templates/error/report_form.twig:3:    <fieldset style="padding-top:0">
templates/export.twig:25:    <div class="floatleft" style="margin-left: 50px;">
templates/table/structure/display_structure.twig:345:              " style="margin-right: 0;">
templates/table/structure/display_structure.twig:534:            {{- default_sliders_state == 'closed' ? ' style="display: none; overflow:auto;"' }} class="pma_auto_slider" title="{% trans 'Partitions' %}"
templates/table/gis_visualization/gis_visualization.twig:4:        <div id="gis_div" style="position:relative;">
templates/table/gis_visualization/gis_visualization.twig:45:            <div class="pma_quick_warp" style="width: 50px; position: absolute; right: 0; top: 0; cursor: pointer;">
templates/table/gis_visualization/gis_visualization.twig:47:                    <span class="drop_button" style="padding: 0; border: 0;">
templates/table/gis_visualization/gis_visualization.twig:68:             style="width:{{ visualization_settings['width'] }}px;height:{{ visualization_settings['height'] }}px;">
templates/table/index_form.twig:52:                {{- default_sliders_state == 'closed' ? ' style="display: none; overflow:auto;"' }} class="pma_auto_slider" title="{% trans 'Advanced options' %}"
templates/table/relation/common_form.twig:104:                {{- default_sliders_state == 'closed' ? ' style="display: none; overflow:auto;"' }} class="pma_auto_slider" title="{% trans 'Internal relationships' %}"
templates/table/search/index.twig:99:      {{- default_sliders_state == 'closed' ? ' style="display: none; overflow:auto;"' }} class="pma_auto_slider" title="{% trans 'Options' %}"
templates/table/chart/tbl_chart.twig:102:                <input style="margin-top:0;" type="text" name="xaxis_label" id="xaxis_label" value="{{ xaxis == -1 ? 'X Values'|trans : keys[xaxis] }}">
templates/table/chart/tbl_chart.twig:148:            <div id="resizer" style="width:600px; height:400px;">
templates/table/chart/tbl_chart.twig:149:                <div style="position: absolute; right: 10px; top: 10px; cursor: pointer; z-index: 1000;">
templates/database/multi_table_query/form.twig:53:                <div id="criteria_div{{ id }}" class="pma_auto_slider" title="{% trans 'criteria' %}" style="display: none; overflow:auto;">
templates/database/designer/database_tables.twig:18:        style="position:absolute; left:
templates/database/designer/database_tables.twig:28:                            style="margin: 0;"
templates/database/designer/database_tables.twig:64:            {{- tab_pos[t_n] is defined and tab_pos[t_n]['V'] is empty ? ' style="display: none"' }}>
templates/database/designer/database_tables.twig:90:                                style="margin: 0;"
templates/database/designer/main.twig:221:                <table width="100%" style="padding-left: 3px;"></table>
templates/database/structure/check_all_tables.twig:8:    <select name="submit_mult" style="margin: 0 3em 0 3em;">
templates/database/qbe/sort_select_cell.twig:2:    <select style="width:{{ real_width }}" name="criteriaSort[{{ column_number }}]" size="1">
templates/database/central_columns/main.twig:148:    <table style="display:inline-block;max-width:49%" class="navigation nospacing nopadding">
templates/server/replication/master_replication.twig:19:        <div id="replication_slaves_section" style="display: none;">
templates/server/replication/status_table.twig:1:<div id="replication_{{ type }}_section"{{ is_hidden ? ' style="display: none;"' }}>
templates/server/user_groups/user_groups.twig:8:                    <th style="white-space: nowrap">
templates/server/status/processes/list.twig:12:                  {%- trans 'Descending' %}" src="themes/dot.gif" style="display: {{ column.sort_order == 'DESC' ? 'none' : 'inline' }}">
templates/server/status/processes/list.twig:14:                  {%- trans 'Ascending' %}" src="themes/dot.gif" style="display: {{ column.sort_order == 'DESC' ? 'inline' : 'none' }}">
templates/server/privileges/privileges_table.twig:792:        <div id="specified_div" style="padding-left:20px;">

Search for style' and style" to catch usage inside JS/Templates:

templates/navigation/main.twig:60:          'style': 'visibility: hidden; display:none',

Arpit-Gulgulia added a commit to Arpit-Gulgulia/phpmyadmin-arpit that referenced this issue Oct 13, 2022
Signed-off-by: Arpit-Gulgulia <arpitgulgulia@gmail.com>
@williamdes
Copy link
Member

To be done:
image

The following changes are not to be changed

Searching <style to catch <style> tag without src=:

templates/error/generic.twig:8:    <style type="text/css">
templates/header.twig:10:    <style id="cfs-style">html{display: none;}</style>
templates/header.twig:28:  <noscript><style>html{display:block}</style></noscript>

williamdes added a commit that referenced this issue Oct 14, 2022
Pull-request: #17788
Ref: #12262

Signed-off-by: William Desportes <williamdes@wdes.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Enhancements
  
Code base