Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Price Floors: fix a typo bug with noDecodeURL #9150

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

takenorim
Copy link
Contributor

Type of change

Bugfix

Description of change

Fix typo. According to the utils.js below, the option object passing to parseUrl should be noDecodeWholeURL rather than noDecodeWholeUrl.

export function parseUrl(url, options) {
  let parsed = document.createElement('a');
  if (options && 'noDecodeWholeURL' in options && options.noDecodeWholeURL) {
    parsed.href = url;
  } else {
    parsed.href = decodeURIComponent(url);
  }
  // in window.location 'search' is string, not object
  let qsAsString = (options && 'decodeSearchAsString' in options && options.decodeSearchAsString);
  return {
    href: parsed.href,
    protocol: (parsed.protocol || '').replace(/:$/, ''),
    hostname: parsed.hostname,
    port: +parsed.port,
    pathname: parsed.pathname.replace(/^(?!\/)/, '/'),
    search: (qsAsString) ? parsed.search : internal.parseQS(parsed.search || ''),
    hash: (parsed.hash || '').replace(/^#/, ''),
    host: parsed.host || window.location.host
  };
}

Other information

            domain: function() {
                return null == k && (k = (0,
                a.parseUrl)((0,
                v.nH)().topmostLocation, {
                    noDecodeWholeUrl: !0
                }).hostname),
                k
            },

->

            domain: function() {
                return null == k && (k = (0,
                a.parseUrl)((0,
                v.nH)().topmostLocation, {
                    noDecodeWholeURL: !0
                }).hostname),
                k
            },

And sending floor data to bidders. This is an example of rubiconBidAdapter's XHR before/after the change.

...(snip)...
rp_secure: 1
rp_maxbids: 1
...(snip)...

->

...(snip)...
rp_secure: 1
rp_hard_floor: 0.07
rp_maxbids: 1
...(snip)...

@jsnellbaker jsnellbaker self-assigned this Oct 25, 2022
@ChrisHuie ChrisHuie changed the title Fix typo bug at the priceFloors module Price Floors: fix a typo bug with noDecodeURL Oct 25, 2022
@ChrisHuie ChrisHuie merged commit 8a1935e into prebid:master Oct 25, 2022
JacobKlein26 pushed a commit to nextmillenniummedia/Prebid.js that referenced this pull request Feb 9, 2023
…module (prebid#9150)

Co-authored-by: Takenori Matsumoto <tmatsumoto@magnite.com>
jorgeluisrocha pushed a commit to jwplayer/Prebid.js that referenced this pull request May 23, 2023
…module (prebid#9150)

Co-authored-by: Takenori Matsumoto <tmatsumoto@magnite.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typo Bug at the priceFloors module
3 participants