Re: [Django] #30686: Truncator.chars splits HTML entities

2019-08-07 Thread Django
#30686: Truncator.chars splits HTML entities
---+--
 Reporter:  Thomas Hooper  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Utilities  |  Version:  2.2
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Carlton Gibson):

 * Attachment "possible-html5lib-truncator-implementation.patch" added.

 Example implemetation of _truncate_html() using html5lib, by Florian
 Apolloner

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.778f58a4023603ab59cdc9abcb1c5995%40djangoproject.com.


Re: [Django] #30686: Truncator.chars splits HTML entities

2019-08-06 Thread Django
#30686: Truncator.chars splits HTML entities
---+--
 Reporter:  Thomas Hooper  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Utilities  |  Version:  2.2
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Thomas Hooper):

 Looks like it can be fixed with this regex change
 https://github.com/django/django/pull/11633/files

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.e319e88186b760533a233e6cc3983b98%40djangoproject.com.


Re: [Django] #30686: Truncator.chars splits HTML entities

2019-08-06 Thread Django
#30686: Truncator.chars splits HTML entities
---+--
 Reporter:  Thomas Hooper  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Utilities  |  Version:  2.2
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Florian Apolloner):

 btw I confused `truncator` with `strip_tags`. So in this case the answer
 would be to rewrite the parser using `html5lib`, while `split_tags` would
 use `bleach` which in turn then uses `html5lib` as well.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.a97fbbd634dfbddc9d508d5e63063d07%40djangoproject.com.


Re: [Django] #30686: Truncator.chars splits HTML entities

2019-08-06 Thread Django
#30686: Truncator.chars splits HTML entities
---+--
 Reporter:  Thomas Hooper  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Utilities  |  Version:  2.2
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Thomas Hooper):

 Here's an example https://repl.it/@tdhooper/Django-truncate-entities-bug

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.825ec8813c1058053a81d42e7dfd12e9%40djangoproject.com.


Re: [Django] #30686: Truncator.chars splits HTML entities

2019-08-06 Thread Django
#30686: Truncator.chars splits HTML entities
---+--
 Reporter:  Thomas Hooper  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Utilities  |  Version:  2.2
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Florian Apolloner):

 I think now that the security release are out let's just add bleach as
 dependency on master and be done with it?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b082d7722660267cb48432eed8817877%40djangoproject.com.


Re: [Django] #30686: Truncator.chars splits HTML entities

2019-08-06 Thread Django
#30686: Truncator.chars splits HTML entities
---+--
 Reporter:  Thomas Hooper  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Utilities  |  Version:  2.2
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Carlton Gibson):

 Hi Thomas. Any chance of an example string (hopefully minimal) that
 creates the behaviour so we can have a look?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.26c09c09ecc674123497f0b780249f49%40djangoproject.com.


Re: [Django] #30686: Truncator.chars splits HTML entities

2019-08-06 Thread Django
#30686: Truncator.chars splits HTML entities
---+--
 Reporter:  tdhooper   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Utilities  |  Version:  2.2
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Description changed by tdhooper:

Old description:

> I'm using Truncator to truncate wikis, and it sometimes truncates in the
> middle of  entities, resulting in 'some text '

New description:

 I'm using Truncator.chars to truncate wikis, and it sometimes truncates in
 the middle of  entities, resulting in 'some text '

--

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.89fdd81dad695489da92df00047ec0ce%40djangoproject.com.


[Django] #30686: Truncator.chars splits HTML entities

2019-08-06 Thread Django
#30686: Truncator.chars splits HTML entities
--+
   Reporter:  tdhooper|  Owner:  nobody
   Type:  Bug | Status:  new
  Component:  Utilities   |Version:  2.2
   Severity:  Normal  |   Keywords:
   Triage Stage:  Unreviewed  |  Has patch:  0
Needs documentation:  0   |Needs tests:  0
Patch needs improvement:  0   |  Easy pickings:  0
  UI/UX:  0   |
--+
 I'm using Truncator to truncate wikis, and it sometimes truncates in the
 middle of  entities, resulting in 'some text '

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.67ad6069d95a9566bf5a8759ce9d48bc%40djangoproject.com.