Skip to content

Commit fe9e941

Browse files
authored
Merge pull request #581 from velopert/fix/tag-length
chore: Trim tag input value and limit to 255 characters
2 parents 673dd79 + a1e34cf commit fe9e941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/write/TagInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const TagInput: React.FC<TagInputProps> = ({ onChange, tags: initialTags }) => {
5050
setValue('');
5151
if (tag === '' || tags.includes(tag)) return;
5252
let processed = tag;
53-
processed = tag.trim();
53+
processed = tag.trim().slice(0,255);
5454
if (processed.indexOf(' #') > 0) {
5555
const tempTags: string[] = [];
5656
const regex = /#(\S+)/g;

0 commit comments

Comments
 (0)