Skip to content

Conversation

Rushaway
Copy link
Contributor

Description

The issue is that links in comments are being displayed as "$1" instead of the actual URL.
This is caused by how preg_replace() is being used in the link processing function.
The $ character is being escaped with a backslash in the replacement pattern, causing PHP to interpret "$1" literally instead of replacing it with the captured reference.

Motivation and Context

#1033

How Has This Been Tested?

See repro of #1033

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@Hackmastr Hackmastr merged commit 80ff547 into sbpp:php81 Apr 17, 2025
@Rushaway Rushaway deleted the links branch April 18, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants