Open Source Training Seminar FreePBX Paid Support

Ticket #2604 (closed Bugs: fixed)

Opened 9 months ago

Last modified 4 months ago

HTML <SELECT> Statements malformed

Reported by: dsdee Assigned to: gregmac
Priority: minor Milestone: 2.5
Component: Web interface Version: 2.4-branch
Keywords: HTML, SELECT Cc:
Confirmation: Confirmed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

I am using mod_proxy_html to gain access to my freepbx server located behind my main server. For some pages, it serves up the pages incorrectly, because it is updating the HTML to properly formed HTML.

In several places in the modules, there is a <SELECT name="foo"/> statement later followed by a </SELECT>. I believe this is incorrect, in that if there is a </close-tag> present, the "/" should not be present in the <open-tag> (ie, <open-tag> not <open-tag/>.

example from page.findmefollow.php:

           <select name="pre_ring"/>
           <?php
                    $default = (isset($pre_ring) ? $pre_ring : 0);
                    for ($i=0; $i <= 60; $i++) {
                             echo '<option value="'.$i.'" '.($i == $default ? 'SELECTED' : '').'>'.$i.'</option>';
                    }
            ?>
            </select>

While somewhat minor, it still means having to correct all these errors in order to view them from in front of my proxy. I have located the error at the following locations (this is not all-inclusive):

announcement/page.announcement.php:                     &nbsp;&nbsp;<select name="recording"/>
announcement/page.announcement.php:                     &nbsp;&nbsp;<select name="repeat_msg"/>
core/page.did.php:                              &nbsp;&nbsp;<select name="mohclass"/>
core/page.routing.php:                          &nbsp;&nbsp;<select name="mohsilence"/>
daynight/page.daynight.php:                     <select name="itemid"/>
daynight/page.daynight.php:                     <select name="state"/>
findmefollow/page.findmefollow.php:                                     <select name="pre_ring"/>
findmefollow/page.findmefollow.php:                                     &nbsp;&nbsp;<select name="strategy"/>
findmefollow/page.findmefollow.php:                     &nbsp;&nbsp;<select name="remotealert"/>
findmefollow/page.findmefollow.php:             &nbsp;&nbsp;<select name="toolate"/>
findmefollow/page.findmefollow.php:                     &nbsp;&nbsp;<select name="annmsg"/>
findmefollow/page.findmefollow.php:                     &nbsp;&nbsp;<select name="ringing"/>
ivr/page.ivr.php:                        <select name="dircontext"/>
ivr/page.ivr.php:                        <select name="annmsg"/>
recordings/page.recordings.php: <select name="sysrec"/>
timeconditions/page.timeconditions.php:                        <select name="hour_start"/>
timeconditions/page.timeconditions.php:                        <select name="minute_start"/>
timeconditions/page.timeconditions.php:                        <select name="hour_finish"/>
timeconditions/page.timeconditions.php:                        <select name="minute_finish"/>
timeconditions/page.timeconditions.php:                       <select name="wday_start"/>
timeconditions/page.timeconditions.php:                       <select name="wday_finish"/>
timeconditions/page.timeconditions.php:                        <select name="mday_start"/>
timeconditions/page.timeconditions.php:                        <select name="mday_finish"/>
timeconditions/page.timeconditions.php:                        <select name="month_start"/>
timeconditions/page.timeconditions.php:                        <select name="month_finish"/>
framework/htdocs/admin/common/jquery-1.1.3.1.js:                                        [1, "<select>", "</select>"] ||
framework/htdocs/admin/common/libfreepbx.javascripts.js:arg=arg.toString();if(typeof arg=="string"){var s=jQuery.trim(arg).toLowerCase(),div=doc.createElement("div"),tb=[];var wrap=!s.indexOf("<opt")&&[1,"<select>","</select>"]||!s.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||(!s.indexOf("<thead")||!s.indexOf("<tbody")||!s.indexOf("<tfoot")||!s.indexOf("<colg"))&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!s.indexOf("<col")&&[2,"<table><colgroup>","</colgroup></table>"]||[0,"",""];div.innerHTML=wrap[1]+arg+wrap[2];while(wrap[0]--)
framework/htdocs/admin/common/script.legacy.js://this will hide or show all the <select> elements on a page
framework/htdocs/admin/common/script.legacy.js:// NOTE: <select> boxes do not support the .select method, therefore you cannot
framework/htdocs/admin/common/script.legacy.js:// use this function on any <select> elements
framework/htdocs/recordings/modules/followme.module:                                    $followme_text .= "<select " . $follow_me_prering_time_text_box_options . " name='follow_me_prering_time'/>";
framework/htdocs/recordings/modules/followme.module:                                    $followme_text .= "<select " . $follow_me_listring_time_text_box_options . " name='follow_me_listring_time'/>";

Attachments

freepbx-2.4.0-select-fix.patch (25.1 kB) - added by kRutOn on 02/22/08 12:46:47.
Patch to fix all the malformed selects in 2.4.0
ticket_2604.diff (1.6 kB) - added by kgarrison on 06/03/08 10:33:28.
Additional changes

Change History

01/12/08 14:03:45 changed by p_lindheimer

  • confirmation changed from Unreviewed to Confirmed.
  • version changed from 2.3.1 to 2.4-branch.
  • milestone changed from Cut Line to 2.4.

I'll assign this to 2.4 - if someone would like to make a patch file we can try to address them all.

02/09/08 13:07:03 changed by p_lindheimer

  • milestone changed from 2.4 to 3.0.

moving to next milestone. It should be cleaned up but we need someone to supply the patches so we can just apply and get it going. Can always be backported.

02/22/08 12:46:47 changed by kRutOn

  • attachment freepbx-2.4.0-select-fix.patch added.

Patch to fix all the malformed selects in 2.4.0

02/25/08 12:52:56 changed by kRutOn

The patch I attached fixes all the <select> bugs that make the pages not pass lint.

06/03/08 10:33:28 changed by kgarrison

  • attachment ticket_2604.diff added.

Additional changes

06/03/08 17:33:04 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

r5762 thanks kRutOn I had not noticed you had added the patch file, there are a lot of tickets so it is easy to have some get behind, always feel free to ping us on them.

r5763 fixes ARI related

Kerry - since you are asking, look at kRutOn's patch, great example of a patch to address several files that applied perfectly (your's applied fine also)

All of these will make it out in their respective modules when they are next published.

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads