Problem/Motivation

High and Normal links don't work - they go to a 404 page:
drupalHighContrast.enableStyles() 404 (Not Found)

Steps to reproduce

Click on links.
The links looked malformed:
High
If you manually edit that to
High
it works fine.

This is version 7.x-1.3+3-dev

Comments

mchaplin created an issue. See original summary.

mnovoa’s picture

Any solution to this?
I use Lexus Zymphonies Theme
and presents the problem described

szt’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
mattia.cristallo’s picture

Hi same problem here.
Module version is 7.x-1.3 and happened after update core to 7.99.
The old worked code is:

<span class="high_contrast_switcher_high" style="display: inline;"><a href="javascript:drupalHighContrast.enableStyles()">Contrast</a></span>

After the update, the no works code is

<span class="high_contrast_switcher_high"><a href="drupalHighContrast.enableStyles()">Contrast</a></span>

Looks like strip in the "a tag, the javascript"

u.tyagi’s picture

This issue is valid since dangerous protocols are omitted from link Paths in new 7.x core. In this particular case, this can be handled by strictly allowing only Highcontrast related function calls through the same chain. This can be done via edition includes/common.inc [line: 2621] and adding the functions in array variable $skip_js_paths.
The values that needs to be added should be in lowercase for it to work. i.e.
[...........,'javascript:drupalhighcontrast.enablestyles()','javascript:drupalhighcontrast.disablestyles()']