Skip to content

Commit a1e34cf

Browse files
committed
chore: Trim tag input value and limit to 255 characters
1 parent 673dd79 commit a1e34cf

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)