Skip to content

Commit

Permalink
fix: fixed re-encoding the html encoded values
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilmhdh committed Aug 2, 2022
1 parent 73b8571 commit 0983891
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
name: A job to automate contrib in readme
steps:
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@v2.3.5
uses: akhilmhdh/contributors-readme-action@v2.3.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -44,7 +44,7 @@ That's it!
To add it to your to your existing workflow, append this to your current `.yml` workflow script.

```yml
- uses: akhilmhdh/contributors-readme-action@v2.3.5
- uses: akhilmhdh/contributors-readme-action@v2.3.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand Down Expand Up @@ -125,23 +125,23 @@ You can add these optional parameters in your action script to modify the appear

```yml
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@v2.3.5
uses: akhilmhdh/contributors-readme-action@v2.3.6
with:
image_size: 100
```

| Option | Default Value | Description | Required |
| ----------------------------- | ---------------------------------------- | --------------------------------------------------------------- | -------- |
| image_size | 100(px) | Size of square images in the stack | false |
| readme_path | README.md | Path of the readme file you want to update | false |
| use_username | false | To use username instead of full name | false |
| columns_per_row | 6 | Number of columns in a row | false |
| collaborators | direct | Type of collaborators options: all/direct/outside | false |
| Option | Default Value | Description | Required |
| ----------------------------- | ----------------------------------------------------------- | --------------------------------------------------------------- | -------- |
| image_size | 100(px) | Size of square images in the stack | false |
| readme_path | README.md | Path of the readme file you want to update | false |
| use_username | false | To use username instead of full name | false |
| columns_per_row | 6 | Number of columns in a row | false |
| collaborators | direct | Type of collaborators options: all/direct/outside | false |
| commit_message | docs(contributor): contrib-readme-action has updated readme | Commit message of the github action | false |
| committer_username | "" | Username on commit | false |
| committer_email | "" | Email id of committer | false |
| committer_username | "" | Username on commit | false |
| committer_email | "" | Email id of committer | false |
| pr_title_on_protected | docs(contributor): contributors readme action update | Title of the PR that will be created if the branch is protected | false |
| auto_detect_branch_protection | true | To override auto protected branch detection | false |
| auto_detect_branch_protection | true | To override auto protected branch detection | false |

> committer_username and committer_email both must be provided to use as a replacement to GH action committer

Expand Down
6 changes: 1 addition & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8585,11 +8585,7 @@ const capitalCaseUtil = str => {

;// CONCATENATED MODULE: ./src/utils/htmlEncoding.js
const htmlEncoding = string => {
return String(string)
.replace(/&/g, '&')
.replace(/>/g, '>')
.replace(/</g, '&lt;')
.replace(/"/g, '&quot;');
return String(string).replace(/>/g, '&gt;').replace(/</g, '&lt;');
};

;// CONCATENATED MODULE: ./src/utils/templateBuilder.js
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions src/utils/htmlEncoding.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
export const htmlEncoding = string => {
return String(string)
.replace(/&/g, '&amp;')
.replace(/>/g, '&gt;')
.replace(/</g, '&lt;')
.replace(/"/g, '&quot;');
return String(string).replace(/>/g, '&gt;').replace(/</g, '&lt;');
};

0 comments on commit 0983891

Please sign in to comment.