More dewikify fixes #188
No reviewers
Labels
No labels
Component: User interface
Component: Wymeditor
Help wanted
Level: Difficult
Level: Easy
Level: Moderate
Pagetype: Festival
Pagetype: Mailinglist
Pagetype: Peer reviewed article
Pagetype: Text
Privacy GDPR AVG
status: has conflicts
Status: Needs changes
Status: Needs discussion
Status: Needs review
Status: Ready to merge
Status: Waiting for response
Type: Bug
Type: Enhancement
Type: Question
Usecase: De Stadsbron
Usecase: Koppelting
Usecase: MeetjeStad
Value: Coders
Value: Security
Value: Users
Value: Visitors
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
harmen/hypha!188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "more-wikify-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This fixes a bunch more problems with (de)wikifying. Turned out that while wikifying was recently fixed, the period of it being broken had caused some bitrot with the dewikifying, which was no longer working or properly being done in a bunch of places. This should fix all of them, by more thoroughly running dewikify in a few general places.
I justed added one more commit that makes all urls in outgoing e-mails absolute. Not entirely on-topic, but close enough (and we needed that for Meetjestad just now). That commit hasn't been tested thoroughly yet.
I've just updated this PR to provide a better fix for text-handling in links by dewikify (backporting a change from upstream php-dom-wrapper, and removing two commits that added workarounds in dewikify) and added wordwrapping for outgoing e-mail (still a bit rough, but better than nothing).
Please see comment about new element
@ -309,0 +312,4 @@// Dewikify a separate element instead of the entire// document, since loading html into a document adds// <html><body>.$elem = $doc->createElement('root');Shouldn't the new element be destroyed here?
@ -309,0 +312,4 @@// Dewikify a separate element instead of the entire// document, since loading html into a document adds// <html><body>.$elem = $doc->createElement('root');What do you mean by destroyed? PHP does reference counting / garbage collection, so it should clean up things by itself? Everything happens in a new document, which should also be cleaned up?
@ -309,0 +312,4 @@// Dewikify a separate element instead of the entire// document, since loading html into a document adds// <html><body>.$elem = $doc->createElement('root');I somehow did not notice that
$docis a new instance, created within this method. So$docgets destroyed directly after exiting the method and with it so does the newly created element.In sort, ignore my comment here. :-)
@ -309,0 +312,4 @@// Dewikify a separate element instead of the entire// document, since loading html into a document adds// <html><body>.$elem = $doc->createElement('root');Ok, ignored ;-)
Also, note that
createElementcreates a node, but does not add it anywhere in the tree.