Skip to content

Commit

Permalink
Merge pull request #138 from Worteks/137-dn-link-encoding
Browse files Browse the repository at this point in the history
Fix HTML escaping in dn_link
  • Loading branch information
coudot authored Jan 19, 2024
2 parents 9b7fb9d + 269d615 commit 740f100
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/value_displayer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
{if $type eq 'dn_link'}
{assign var="link" value="{{get_attribute dn="{$value}" attribute="{$dn_link_label_attributes}" ldap_url="{$ldap_params.ldap_url}" ldap_starttls="{$ldap_params.ldap_starttls}" ldap_binddn="{$ldap_params.ldap_binddn}" ldap_bindpw="{$ldap_params.ldap_bindpw}" ldap_filter="{$ldap_params.ldap_user_filter}" ldap_network_timeout="{$ldap_params.ldap_network_timeout}"}|truncate:{$truncate_value_after}}"}
{if $link}
<a href="index.php?page=display&dn={$value|escape:'url'}&search={$search}">{$link}</a><br />
<a href="index.php?page=display&dn={$value|escape:'url'}&search={$search}">{$link|unescape:'html'}</a><br />
{/if}
{/if}

{if $type eq 'group_dn_link'}
{assign var="link" value="{{get_attribute dn="{$value}" attribute="{$group_dn_link_label_attributes}" ldap_url="{$ldap_params.ldap_url}" ldap_starttls="{$ldap_params.ldap_starttls}" ldap_binddn="{$ldap_params.ldap_binddn}" ldap_bindpw="{$ldap_params.ldap_bindpw}" ldap_filter="{$ldap_params.ldap_group_filter}" ldap_network_timeout="{$ldap_params.ldap_network_timeout}"}|truncate:{$truncate_value_after}}"}
{if $link}
<a href="index.php?page=display&dn={$value|escape:'url'}&search={$search}">{$link}</a><br />
<a href="index.php?page=display&dn={$value|escape:'url'}&search={$search}">{$link|unescape:'html'}</a><br />
{/if}
{/if}

{if $type eq 'usergroup_dn_link'}
{assign var="link" value="{{get_attribute dn="{$value}" attribute="{$usergroup_dn_link_label_attributes}" ldap_url="{$ldap_params.ldap_url}" ldap_starttls="{$ldap_params.ldap_starttls}" ldap_binddn="{$ldap_params.ldap_binddn}" ldap_bindpw="{$ldap_params.ldap_bindpw}" ldap_filter="(|{$ldap_params.ldap_group_filter}{$ldap_params.ldap_user_filter})" ldap_network_timeout="{$ldap_params.ldap_network_timeout}"}|truncate:{$truncate_value_after}}"}
{if $link}
<a href="index.php?page=display&dn={$value|escape:'url'}&search={$search}">{$link}</a><br />
<a href="index.php?page=display&dn={$value|escape:'url'}&search={$search}">{$link|unescape:'html'}</a><br />
{/if}
{/if}

Expand Down

0 comments on commit 740f100

Please sign in to comment.