New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ticket/13847] Move quote generation to text_formatter.utils #3616
Conversation
$message_parser->message = '[quote="' . $post_data['quote_username'] . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n"; | ||
$message_parser->message = $phpbb_container->get('text_formatter.utils')->generate_quote( | ||
censor_text(trim($message_parser->message)), | ||
array('author' => $post_data['quote_username']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't we generate the quote with a link to the user profile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. You can put as much metadata as you want, and then use it in the template. I'm wary of overloading the UI though. There's a topic about possible quote improvements on A51.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets discuss that on a51 so
00e1bab
to
43ee388
Compare
@Nicofuma Can you merge this PR whenever you have time please? Other PRs will depend on it and since most of my PRs modify more or less the same files I'm getting conflicts when merging/rebasing. |
Will enclose attribute values in single- or double- quotes depending on whichever requires the least escaping. Characters that need to be escaped are always escaped regardless. PHPBB3-13847
...when quoting a post PHPBB3-13847
[ticket/13847] Move quote generation to text_formatter.utils
https://tracker.phpbb.com/browse/PHPBB3-13847
The markup used for quotes,
[quote=".."]...[/quote]
is currently hardcoded in posting.php. This could be moved to a method in thetext_formatter.utils
service.Ultimately, anything that manipulates markup should live in a
text_formatter.*
service.