mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
multi lines in content type description#1543
This commit is contained in:
parent
8b78daf3e7
commit
aada9332a5
@ -48,7 +48,7 @@ module.exports = {
|
||||
return ctx.badRequest(null, [{ messages: attributesErrors }]);
|
||||
}
|
||||
|
||||
const _description = escapeNewlines(description);
|
||||
const _description = escapeNewlines(description, '\\n');
|
||||
|
||||
strapi.reload.isWatching = false;
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ const reorderList = (manager, list) => {
|
||||
};
|
||||
|
||||
const escapeNewlines = (content, placeholder = '\n') => {
|
||||
return content.replace(/[\n]+/g, placeholder);
|
||||
return content.replace(/[\r\n]+/g, placeholder);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user