Pinterest recently introduced Board Sections: https://blog.pinterest.com/en/new-way-organize-your-ideas-pinterest
This allows users to organize larger boards into sections, which can be viewed on their own.
Board Section urls are of the form https://www.pinterest.com/user/board/section-name/ . These are valid URLs for populating a widget, as can be tested here: https://developers.pinterest.com/tools/widget-builder/?type=board&boardH...
The regex currently in place for validating Boards rejects these URLs, and should be updated to accommodate them.
Additionally, URLs with UTF-8 characters are valid Pinterest URLs, i.e.
https://www.pinterest.com/pinterestfr/pinterest-100-2018/enfants-éducation/
These should also be accommodated by the validations patterns.
Further, when copying such URLs from the location bar, browsers often URL encode them automatically, giving for the above:
https://www.pinterest.com/pinterestfr/pinterest-100-2018/enfants-%C3%A9d...
Since we can't know that a URL would be of one form or the other, we should allow `%` as a character in places where there might be UTF-8 characters.
Comment | File | Size | Author |
---|---|---|---|
#16 | 2939923-media_entity_pinterest_allow_utf8-16.patch | 7.58 KB | gg4 |
| |||
#14 | 2939923--11-12.diff | 1.45 KB | gg4 |
#12 | 2939923-media_entity_pinterest_allow_utf8-12.patch | 8.63 KB | gg4 |
|
Comments
Comment #2
timcosgrove CreditAttribution: timcosgrove at Pinterest commentedComment #3
timcosgrove CreditAttribution: timcosgrove at Pinterest commentedComment #4
timcosgrove CreditAttribution: timcosgrove at Pinterest commentedThis adds a completely optional
<section>
named group to the boards regex. The group is identical to the board regex, except for it being optional.It also adds the
u
flag to the regexes that support UTF-8, and adds the%
character to those locations that might show that, given a urlencoded UTF-8 character.Comment #5
timcosgrove CreditAttribution: timcosgrove at Pinterest commentedComment #6
timcosgrove CreditAttribution: timcosgrove at Pinterest commentedUpdated patch which removes the % in the regex and instead urldecodes items that are being tested. This is in line with what is done in the Pinterest widget JS.
Comment #8
gg4 CreditAttribution: gg4 commentedNeeds backport to 8.x-1.x
Comment #10
gg4 CreditAttribution: gg4 commentedPatch in #6 breaks regular Board embedding.
Comment #11
timcosgrove CreditAttribution: timcosgrove at Pinterest commentedI went with an approach of treating board sections separately, which we probably wanted to do anyway. The regex more explicitly excludes section URLs from boards and vice versa, provides a template for it, adds it to MetadataAttributes, etc.
Comment #12
gg4 CreditAttribution: gg4 commentedComment #14
gg4 CreditAttribution: gg4 commentedCommited #12 and fixed a few things in the process.
Setting back to needs work for 8.x-1.x.
Comment #15
gg4 CreditAttribution: gg4 commentedComment #16
gg4 CreditAttribution: gg4 commentedComment #18
gg4 CreditAttribution: gg4 commented