Skip to content

Commit 5878a12

Browse files
committed
remove HTML allow list
1 parent 68955b9 commit 5878a12

File tree

3 files changed

+0
-30
lines changed

3 files changed

+0
-30
lines changed

activitypub.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function init() {
2222
\defined( 'ACTIVITYPUB_EXCERPT_LENGTH' ) || \define( 'ACTIVITYPUB_EXCERPT_LENGTH', 400 );
2323
\defined( 'ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS' ) || \define( 'ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS', 3 );
2424
\defined( 'ACTIVITYPUB_HASHTAGS_REGEXP' ) || \define( 'ACTIVITYPUB_HASHTAGS_REGEXP', '(?:(?<=\s)|(?<=<p>)|(?<=<br>)|^)#([A-Za-z0-9_]+)(?:(?=\s|[[:punct:]]|$))' );
25-
\defined( 'ACTIVITYPUB_ALLOWED_HTML' ) || \define( 'ACTIVITYPUB_ALLOWED_HTML', '<strong><a><p><ul><ol><li><code><blockquote><pre><img>' );
2625
\defined( 'ACTIVITYPUB_CUSTOM_POST_CONTENT' ) || \define( 'ACTIVITYPUB_CUSTOM_POST_CONTENT', "<p><strong>[ap_title]</strong></p>\n\n[ap_content]\n\n<p>[ap_hashtags]</p>\n\n<p>[ap_shortlink]</p>" );
2726
\define( 'ACTIVITYPUB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
2827
\define( 'ACTIVITYPUB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );

includes/class-admin.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,6 @@ public static function register_settings() {
132132
'default' => 0,
133133
)
134134
);
135-
\register_setting(
136-
'activitypub',
137-
'activitypub_allowed_html',
138-
array(
139-
'type' => 'string',
140-
'description' => \__( 'List of HTML elements that are allowed in activities.', 'activitypub' ),
141-
'default' => ACTIVITYPUB_ALLOWED_HTML,
142-
)
143-
);
144135
\register_setting(
145136
'activitypub',
146137
'activitypub_support_post_types',

templates/settings.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -140,26 +140,6 @@
140140
</p>
141141
</td>
142142
</tr>
143-
<tr>
144-
<th scope="row">
145-
<?php \esc_html_e( 'HTML Allowlist', 'activitypub' ); ?>
146-
</th>
147-
<td>
148-
<textarea name="activitypub_allowed_html" id="activitypub_allowed_html" rows="3" cols="50" class="large-text"><?php echo esc_html( \get_option( 'activitypub_allowed_html', ACTIVITYPUB_ALLOWED_HTML ) ); ?></textarea>
149-
<p class="description">
150-
<?php
151-
echo \wp_kses(
152-
\sprintf(
153-
// translators:
154-
\__( 'A list of HTML elements, you want to allowlist for your activities. <strong>Leave list empty to support all HTML elements</strong>. Default: <code>%s</code>', 'activitypub' ),
155-
\esc_html( ACTIVITYPUB_ALLOWED_HTML )
156-
),
157-
'default'
158-
);
159-
?>
160-
</p>
161-
</td>
162-
</tr>
163143
</tbody>
164144
</table>
165145

0 commit comments

Comments
 (0)