Skip to content

Commit

Permalink
use escape only, instead of character filtering. Fixes #237
Browse files Browse the repository at this point in the history
  • Loading branch information
ciur committed Dec 23, 2020
1 parent 76113d8 commit 8e0c875
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions papermerge/core/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ class CannotUpload(Exception):
file_name = models.CharField(
max_length=1024,
default='',
validators=[validators.safe_character_validator]
)

notes = models.TextField(
_('Notes'),
blank=True,
null=True,
validators=[validators.safe_character_validator]
null=True
)

size = models.BigIntegerField(
Expand Down
3 changes: 1 addition & 2 deletions papermerge/core/models/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ class BaseTreeNode(PolymorphicMPTTModel):
)
title = models.CharField(
_("Title"),
max_length=200,
validators=[validators.safe_character_validator]
max_length=200
)

lang = models.CharField(
Expand Down
5 changes: 1 addition & 4 deletions papermerge/core/models/tags.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _

from papermerge.core import validators

from taggit.models import TagBase, GenericTaggedItemBase
from taggit.managers import TaggableManager

Expand Down Expand Up @@ -82,8 +80,7 @@ class Tag(TagBase):
name = models.CharField(
verbose_name=_("name"),
unique=False,
max_length=100,
validators=[validators.safe_character_validator]
max_length=100
)

class Meta:
Expand Down

0 comments on commit 8e0c875

Please sign in to comment.