• Resolved patoudss

    (@patoudss)


    Hello,

    As the thread is closed but no response for my request, I repost here :
    I’m using the Exclusive Addons Elementor version 2.6.9.5, and the link anything not working.
    When I debug the javascript code for doing the link :

        $('body').on('click.onWrapperLink', '[data-exad-element-link]', function(e) {
            var $wrapper = $(this), data = $wrapper.data('exad-element-link'), id = $wrapper.data('id'), anchor = document.createElement('a'), anchorReal, timeout;
            if ('undefined' === typeof data.url) {
                return false
            }
            let url = encodeURIComponent(data.url)
              , validUrl = eae_isValidHttpUrl(url);
            if (validUrl.badInput === false && validUrl.customError === false && validUrl.patternMismatch === false && validUrl.rangeOverflow === false && validUrl.rangeUnderflow === false && validUrl.stepMismatch === false && validUrl.tooLong === false && validUrl.tooShort === false && validUrl.typeMismatch === true && validUrl.valid === false && validUrl.valueMissing === false) {
                url = document.location.href.replace('#', '') + url;
                validUrl = eae_isValidHttpUrl(url)
            }
            if (validUrl.valid === false) {
                e.preventDefault();
                e.stopPropagation();
                return false
            }
            url = eae_decodeURI(url);

    Expand

    The data.url has the url in the form of https://site.com/path
    The encodeURIComponent(data.url) become “https%3A%2F%2Fsite.com%2Fpath”
    the code validUrl = eae_isValidHttpUrl(url) not valid to the encoded URI and the condition will concatenate the url encoded to the current url.
    url = document.location.href.replace('#', '') + url;
    the url will be after the code : https://site.com/https%3A%2F%2Fsite.com%2Fpath

    you may use the encodeURI function instead of encodeURIComponent

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.