Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 416 of 808  Not logged in ELOG logo
    icon2.gif   Re: Change / List Change doen't work anymore?, posted by Harry Martin on Tue Dec 1 02:39:45 2020 

Harry Martin wrote:

Stefan Ritt wrote:

Holger Mundhahs wrote:
Hello @all,

I'm not sure if this is a bug, but after upgradeing from 2.7.0 to 2.7.7 the Change <attribute> and List Change <attribute> doesn't work anymore. In my .cfg file I've:

Quote:
Change RIB-http = <a href="https://$RIB-Hostname/" target="_new">RIB-Board</a>
List Change RIB-http = <a href="https://$RIB-Hostname/" target="_new">RIB-Board</a>


In the old ELOG version I've "RIB-Board" as text in the page and the link works well. But now there is the following code generated:

Quote:
<tr><td nowrap class="attribname">RIB-http:</td><td class="attribvalue">
&lt;a href="<a href="https://RIB-COMPUTER/">https://RIB-COMPUTER/</a>" target="_new"&gt;RIB-Board&lt;/a&gt;&nbsp;</td>
</tr>

Is the syntax changed from 2.7.0 to 2.7.7? What's the correct syntax for 2.7.7?


For security reasons (XSS or cross site scripting) , HTML code in attributes is not allowed by default. To turn it on (and if you know what you are doing), add following line to your configuration
Allow HTML = 1



I know this is an old, old thread, but I am trying to use this feature in a recent version of elog (3.1.3). Is there any chance this will ever get fixed, or at least made workable? I tried "Allow HTML = 1", but that did not work. I'd like to be able to use this to link directly to carriers to track packages.

Also, the documentation seemed a bit confusing to me:

Quote:
Change <attribute> = <string>
Instead of subsituting an attribute, the original attribute can be kept and just the output formatting can be changed. This can be very handy for constructing HTML links out of attributes. Presume that a company has a telephone book reachable under

http://any.company.com/telbook.cgi?search=<name>

where <name> has to be replaced by a search string. Now one can construct an automatic telephonebook lookup with following options:

Attributes = Name, Telephone, ...
Display Telephone = <a href="http://any.company.com/telbook.cgi?search=$Name">$Name's telephone number</a>

The attribute Telephone is now automatically constructed from the attribute Name and consists of a link to the company's telephonebook. The advantage of this system is if the URL of the telephonebook changes one day, only one statement in the config file has to be changed, while otherways (like with the Subst Telephone = ... option) all entries would have to be changed manually.


The example seems to be using a different syntax ("Display Telephone") rather than the syntax described by the section header ("Change <attribute>...").

Any update to this information would be greatly appreciated. I'm just looking for a workable solution of any kind. Thank you for your continuing fine work.


I am able to make it work by passing just a plain string constructing the URL. Strange though... before I posted the previous log entry, it didn't work no matter what I tried! Bizarre.

However, it would still be a good idea to update the documentation to clarify things somewhat and bring it up to date with actual usage today.
    icon2.gif   Re: Change / List Change doen't work anymore?, posted by Andreas Luedeke on Tue Dec 1 22:57:25 2020 

Harry Martin wrote:

Harry Martin wrote:

Stefan Ritt wrote:

Holger Mundhahs wrote:
Hello @all,

I'm not sure if this is a bug, but after upgradeing from 2.7.0 to 2.7.7 the Change <attribute> and List Change <attribute> doesn't work anymore. In my .cfg file I've:

Quote:
Change RIB-http = <a href="https://$RIB-Hostname/" target="_new">RIB-Board</a>
List Change RIB-http = <a href="https://$RIB-Hostname/" target="_new">RIB-Board</a>


In the old ELOG version I've "RIB-Board" as text in the page and the link works well. But now there is the following code generated:

Quote:
<tr><td nowrap class="attribname">RIB-http:</td><td class="attribvalue">
&lt;a href="<a href="https://RIB-COMPUTER/">https://RIB-COMPUTER/</a>" target="_new"&gt;RIB-Board&lt;/a&gt;&nbsp;</td>
</tr>

Is the syntax changed from 2.7.0 to 2.7.7? What's the correct syntax for 2.7.7?


For security reasons (XSS or cross site scripting) , HTML code in attributes is not allowed by default. To turn it on (and if you know what you are doing), add following line to your configuration
Allow HTML = 1



I know this is an old, old thread, but I am trying to use this feature in a recent version of elog (3.1.3). Is there any chance this will ever get fixed, or at least made workable? I tried "Allow HTML = 1", but that did not work. I'd like to be able to use this to link directly to carriers to track packages.

Also, the documentation seemed a bit confusing to me:

Quote:
Change <attribute> = <string>
Instead of subsituting an attribute, the original attribute can be kept and just the output formatting can be changed. This can be very handy for constructing HTML links out of attributes. Presume that a company has a telephone book reachable under

http://any.company.com/telbook.cgi?search=<name>

where <name> has to be replaced by a search string. Now one can construct an automatic telephonebook lookup with following options:

Attributes = Name, Telephone, ...
Display Telephone = <a href="http://any.company.com/telbook.cgi?search=$Name">$Name's telephone number</a>

The attribute Telephone is now automatically constructed from the attribute Name and consists of a link to the company's telephonebook. The advantage of this system is if the URL of the telephonebook changes one day, only one statement in the config file has to be changed, while otherways (like with the Subst Telephone = ... option) all entries would have to be changed manually.


The example seems to be using a different syntax ("Display Telephone") rather than the syntax described by the section header ("Change <attribute>...").

Any update to this information would be greatly appreciated. I'm just looking for a workable solution of any kind. Thank you for your continuing fine work.


I am able to make it work by passing just a plain string constructing the URL. Strange though... before I posted the previous log entry, it didn't work no matter what I tried! Bizarre.

However, it would still be a good idea to update the documentation to clarify things somewhat and bring it up to date with actual usage today.


You are referring here to a Forum entry for an old ELOG version: this will not be changed, since it was for that old version.
If you want some documentation to be updated, then you should show the documentation part that should be updated.
    icon2.gif   Re: Change / List Change doen't work anymore?, posted by Harry Martin on Wed Dec 2 00:43:31 2020 

Andreas Luedeke wrote:

Harry Martin wrote:

Harry Martin wrote:

Stefan Ritt wrote:

Holger Mundhahs wrote:
Hello @all,

I'm not sure if this is a bug, but after upgradeing from 2.7.0 to 2.7.7 the Change <attribute> and List Change <attribute> doesn't work anymore. In my .cfg file I've:

Quote:
Change RIB-http = <a href="https://$RIB-Hostname/" target="_new">RIB-Board</a>
List Change RIB-http = <a href="https://$RIB-Hostname/" target="_new">RIB-Board</a>


In the old ELOG version I've "RIB-Board" as text in the page and the link works well. But now there is the following code generated:

Quote:
<tr><td nowrap class="attribname">RIB-http:</td><td class="attribvalue">
&lt;a href="<a href="https://RIB-COMPUTER/">https://RIB-COMPUTER/</a>" target="_new"&gt;RIB-Board&lt;/a&gt;&nbsp;</td>
</tr>

Is the syntax changed from 2.7.0 to 2.7.7? What's the correct syntax for 2.7.7?


For security reasons (XSS or cross site scripting) , HTML code in attributes is not allowed by default. To turn it on (and if you know what you are doing), add following line to your configuration
Allow HTML = 1



I know this is an old, old thread, but I am trying to use this feature in a recent version of elog (3.1.3). Is there any chance this will ever get fixed, or at least made workable? I tried "Allow HTML = 1", but that did not work. I'd like to be able to use this to link directly to carriers to track packages.

Also, the documentation seemed a bit confusing to me:

Quote:
Change <attribute> = <string>
Instead of subsituting an attribute, the original attribute can be kept and just the output formatting can be changed. This can be very handy for constructing HTML links out of attributes. Presume that a company has a telephone book reachable under

http://any.company.com/telbook.cgi?search=<name>

where <name> has to be replaced by a search string. Now one can construct an automatic telephonebook lookup with following options:

Attributes = Name, Telephone, ...
Display Telephone = <a href="http://any.company.com/telbook.cgi?search=$Name">$Name's telephone number</a>

The attribute Telephone is now automatically constructed from the attribute Name and consists of a link to the company's telephonebook. The advantage of this system is if the URL of the telephonebook changes one day, only one statement in the config file has to be changed, while otherways (like with the Subst Telephone = ... option) all entries would have to be changed manually.


The example seems to be using a different syntax ("Display Telephone") rather than the syntax described by the section header ("Change <attribute>...").

Any update to this information would be greatly appreciated. I'm just looking for a workable solution of any kind. Thank you for your continuing fine work.


I am able to make it work by passing just a plain string constructing the URL. Strange though... before I posted the previous log entry, it didn't work no matter what I tried! Bizarre.

However, it would still be a good idea to update the documentation to clarify things somewhat and bring it up to date with actual usage today.


You are referring here to a Forum entry for an old ELOG version: this will not be changed, since it was for that old version.
If you want some documentation to be updated, then you should show the documentation part that should be updated.



I have been looking at the documentation at https://elog.psi.ch/elog/config.html#attrib. (See the quoted portion, above.) If there is newer documentation, please post a link for it here. Thank you!
    icon2.gif   Re: Change / List Change doen't work anymore?, posted by Stefan Ritt on Wed Dec 2 11:51:24 2020 
Yepp, the documentation was wrong. I fixed it.

Stefan
    icon2.gif   Re: Change / List Change doen't work anymore?, posted by Harry Martin on Thu Dec 3 01:53:59 2020 

Stefan Ritt wrote:
Yepp, the documentation was wrong. I fixed it.

Stefan


Thank you.
icon5.gif   ELcode in Summary Text, posted by Dan on Fri Sep 4 20:44:32 2009 
Hello,

   Thank you for such a great piece of software!

   When displaying the entries in a log book with Summary view, ELCode is not processed in 'Text'. I know there
is an option called 'Allow HTML", but is there something similar for decoding ELCode in the Summary 'Text' field?

Thank you again,
   - Dan
    icon2.gif   Re: ELcode in Summary Text, posted by Stefan Ritt on Mon Sep 7 15:18:39 2009 
> Hello,
> 
>    Thank you for such a great piece of software!
> 
>    When displaying the entries in a log book with Summary view, ELCode is not processed in 'Text'. I know 
there
> is an option called 'Allow HTML", but is there something similar for decoding ELCode in the Summary 'Text' 
field?
> 
> Thank you again,
>    - Dan

Decoding HTML (or ELCode which translates to HTML) in the summary field is difficult, since the text is 
truncated. 
Assume you have some code like

Text
<b>Text
  <i>Text
----- cut here
</i>
</b>

Sot he bold <b> and italics <i> tags are opened, but closed after the cutting line. In that case the whole page 
might render wrongly, because everything after the summary text will be displayed in bold and italics. To fix this I 
would have to scan the HTML code and close all open tags "by hand". But since there are very many possibilities, 
especially if one used multi-column tables, this is almost impossible without writing my own HTML parser which is 
beyond the scope of elog. So the only clean solution I have found so far is to strip off all HTML formatting and 
just showing plain text there.
    icon2.gif   Re: ELcode in Summary Text, posted by Dan on Tue Sep 8 22:56:02 2009 
That would be a lot of effort for very little gain. I appreciate your detailed response. 

Thank you,
   - Dan

> > Hello,
> > 
> >    Thank you for such a great piece of software!
> > 
> >    When displaying the entries in a log book with Summary view, ELCode is not processed in 'Text'. I know 
> there
> > is an option called 'Allow HTML", but is there something similar for decoding ELCode in the Summary 'Text' 
> field?
> > 
> > Thank you again,
> >    - Dan
> 
> Decoding HTML (or ELCode which translates to HTML) in the summary field is difficult, since the text is 
> truncated. 
> Assume you have some code like
> 
> Text
> <b>Text
>   <i>Text
> ----- cut here
> </i>
> </b>
> 
> Sot he bold <b> and italics <i> tags are opened, but closed after the cutting line. In that case the whole page 
> might render wrongly, because everything after the summary text will be displayed in bold and italics. To fix this I 
> would have to scan the HTML code and close all open tags "by hand". But since there are very many possibilities, 
> especially if one used multi-column tables, this is almost impossible without writing my own HTML parser which is 
> beyond the scope of elog. So the only clean solution I have found so far is to strip off all HTML formatting and 
> just showing plain text there.
ELOG V3.1.5-3fb85fa6