Skip to content

Commit

Permalink
Fix comment error for authors with special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
smoke-indica committed Aug 6, 2020
1 parent 0c09ae0 commit 7f4ab77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/redux/TransactionSaga.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ function* createPermlink(title, author, parent_author, parent_permlink) {
// comments: re-parentauthor-parentpermlink-time
const timeStr = new Date().toISOString().replace(/[^a-zA-Z0-9]+/g, '').toLowerCase();
parent_permlink = parent_permlink.replace(/(-\d{8}t\d{9}z)/g, '')
// Periods allowed in author are not allowed in permlink.
parent_author = parent_author.replace(/\./g, '');
permlink = `re-${parent_author}-${parent_permlink}-${timeStr}`
}
if (permlink.length > 255) {
Expand Down

0 comments on commit 7f4ab77

Please sign in to comment.