Skip to content

Commit

Permalink
V12 Write pips as HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Sep 13, 2018
1 parent d20f2e6 commit c8a6d2b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ An extensive documentation, including **examples**, **options** and **configurat
Changelog
---------

### 12.0.0 (*unreleased*)
- Fixed: Pips formatting are now written as HTML (#875);

### 11.1.0 (*2018-04-02*)
- Change: `null` options are now handled consistently (#856);
- Fixed: Missing transform origin in IE9 (#870);
Expand Down
2 changes: 2 additions & 0 deletions documentation/pips.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@

<p>The Pips add-on supports <code>format</code> in the same way the slider itself does.</p>

<p>Pips are written as HTML. If you are using user-supplied values in the format option, you may want to escape them.</p>

</div>

<div class="side">
Expand Down
2 changes: 1 addition & 1 deletion documentation/pips/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ noUiSlider.create(pipsSteps, {
filter: filter500,
format: wNumb({
decimals: 2,
prefix: '$'
prefix: '&euro;'
})
}
});
2 changes: 1 addition & 1 deletion src/nouislider.js
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@
);
node.setAttribute("data-value", values[0]);
node.style[options.style] = offset + "%";
node.innerText = formatter.to(values[0]);
node.innerHTML = formatter.to(values[0]);
}
}

Expand Down

0 comments on commit c8a6d2b

Please sign in to comment.