Skip to content

Extract long repeating sanitization bases into variable#871

Merged
mblaney merged 1 commit intosimplepie:masterfrom
jtojnar:sanitize-cleanup
Jul 24, 2024
Merged

Extract long repeating sanitization bases into variable#871
mblaney merged 1 commit intosimplepie:masterfrom
jtojnar:sanitize-cleanup

Conversation

@jtojnar
Copy link
Member

@jtojnar jtojnar commented Jul 22, 2024

The following regular expression matches:

^( +)(\$[a-z_]+) = \$this->sanitize\((.+)\['data'\](, .+), \$this->get_base\(\3\)

were replaced by:

\1\2 = \3;\n\1\2 = \$this->sanitize\(\2\['data'\]\4, \$this->get_base\(\2\)

The following regular expression matches:

    ^( +)(\$[a-z_]+) = \$this->sanitize\((.+)\['data'\](, .+), \$this->get_base\(\3\)

were replaced by:

    \1\2 = \3;\n\1\2 = \$this->sanitize\(\2\['data'\]\4, \$this->get_base\(\2\)
@jtojnar jtojnar force-pushed the sanitize-cleanup branch from f9ab717 to 90cc990 Compare July 22, 2024 07:25
@mblaney mblaney merged commit 9385c54 into simplepie:master Jul 24, 2024
@jtojnar jtojnar deleted the sanitize-cleanup branch September 14, 2024 15:06
@Art4 Art4 added this to the 1.9.0 milestone Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants