Skip to content

Commit

Permalink
fix badly encoded %23
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Jan 28, 2024
1 parent 95e42fd commit d5f3710
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
<li>
<span class="step-paste"></span>
<br>
<textarea autofocus oninput="reactInput(this.value)"></textarea>
<textarea autofocus oninput="textareaInput(this.value)"></textarea>
</li>
<li>
<span class="step-share"></span>
Expand Down Expand Up @@ -257,6 +257,13 @@
(isValid ? document.querySelector('form') : document.querySelector('section')).classList.add('hidden');
};

function textareaInput(inputData) {
// first # may be wrongly encoded to %23 by safari/iOS; convert it back. see issue #16
inputData = inputData.replace(/%23/, '#')

reactInput(inputData)
}

reactInput(window.location.hash.substr(1));

i18next.init({
Expand Down

0 comments on commit d5f3710

Please sign in to comment.