[webif] Web Interface 1.4.x

Black Hole

May contain traces of nut
The addition of a "find" search box to the WebIF home page would prove useful to some, who don't know where to find some of the settings (I sometimes have to hunt).
 

4ndy

Forum Supporter
A search function could also be useful to find recordings mis-filed by CRID data or, remamed, or even in my case, can't remember which box the recording is on.
 

MymsMan

Ad detector
The addition of a "find" search box to the WebIF home page would prove useful to some, who don't know where to find some of the settings (I sometimes have to hunt).
It might be a difficult idea to implement, while many packages store settings in webif.db others don't and often the key names differ from the menu settings name plus there are the various Humax settings on various settings pages
 

Black Hole

May contain traces of nut
It might be a difficult idea to implement, while many packages store settings in webif.db others don't and often the key names differ from the menu settings name plus there are the various Humax settings on various settings pages
Yes. I was forgetting the WebIF pages are generated dynamically instead of being static HTML (which would be easy to search).
 

prpr

Well-Known Member
I was just about to post this before all the excitement started this morning...

The WebIf (1.4.9-5 in use) doesn't seem to handle folder names containing commas properly. Here is an example of two folders containing identical content that don't display properly:

1617984306867.png

Originally spotted with "Yes, Minister".
 

/df

Well-Known Member
I was just about to post this before all the excitement started this morning...

The WebIf (1.4.9-5 in use) doesn't seem to handle folder names containing commas properly. Here is an example of two folders containing identical content that don't display properly:
...
The class="filesize" span element is present but not populated. This depends on calculating an ID string from the folder name in JS that is the same as the ID when generated from the folder name in Jim. Sadly, we get for a folder with name "Flow,ers":
Code:
JS: "RmxvdyUyQ2Vycw"
Jim: "RmxvdyxlcnM"
This is because JS escape() makes ',' into '%2C' but the Jim proc ::js::escape that is meant to be equivalent doesn't. In turn this is because in a bracket expression in a regular expression the character '-' has to be first or last in the set of characters and ranges. Therefore:
Code:
--- a/webif/lib/utils
+++ b/webif/lib/utils
@@ -102,7 +102,7 @@
 
 proc ::js::escape {str} {
        return [subst -nobackslashes -novariables \
-               [regsub -all -- {[^A-Za-z0-9@*_+-./]+} $str \
+               [regsub -all -- {[^A-Za-z0-9@*_+./-]+} $str \
                        {[::js::_escape {&}]}]]
 }
The character range '+-.' means this set of characters '+-,.'. Out of the four, just ',' happened to be incorrectly categorised.
 
Last edited:

prpr

Well-Known Member
In turn this is because in a bracket expression in a regular expression the character '-' has to be first or last in the set of characters and ranges.
I knew you'd know! Thanks, that one would have taken me days...
 

/df

Well-Known Member
He who dealt it smelled it.

When I added those routines I was probably so carried away by the idea of changing all the to-be-escaped characters into embedded calls and evaluating the whole lot with subst that I took my eye off man -k 7 regex.

And https://git.hpkg.tv/hummypkg/webif/pulls/45.
 
Last edited:
Top