Skip to content

Conversation

@Bishwas-py
Copy link
Contributor

As the issue #129 , this PR solves the issue of footnotes and makes them functioning/renderable.

Comment on lines -53 to 43
.replace(/\s+/g, '-') // Replace spaces with hyphen
.replace(/[^\w-]+/g, '') // Remove all non-word chars
.replace(/--+/g, '-') // Replace multiple hyphen with single hyphen
.replace(/(^-|-$)/g, ''); // Remove leading or trailing hyphen
.replace(/[^\w-]+/g, '') // Remove all non-word chars
.replace(/--+/g, '-') // Replace multiple hyphen with single hyphen
.replace(/(^-|-$)/g, ''); // Remove leading or trailing hyphen
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a lot of PR noise from this reformatting - recommend not doing this in bigger projects!

@swyxio swyxio merged commit 10e2db4 into swyxio:main Sep 25, 2023
.toString();
description = description.replace(/\n/g, ' ');
// strip html
description = description.replace(/<[^>]*>?/gm, '');

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<script](1), which may cause an HTML element injection vulnerability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants