woocommerce / woocommerce-subscriptions-custom-price-string

Customize the price displayed to your customers for subscription products (or non-subscription product).
GNU General Public License v3.0
61 stars 11 forks source link

Html tags in input #15

Open plapeyre opened 3 years ago

plapeyre commented 3 years ago

You can submit html tags in the input (eg: font-style:bold) to make the text to display bold and it displays but when you revisit the edit page the html tags are stripped and they have to be added again otherwise the changes made dont stick. I've had to add custom css to override this as the plugin strips the original css to the price and makes it plain default text.

jrick1229 commented 3 years ago

HTML is not currently supported @aliqua-au - but feel free to submit a PR for these types of changes if you're knowledgeable in PHP.

CodeShakingSheep commented 2 months ago

You can submit html tags in the input (eg: font-style:bold) to make the text to display bold and it displays but when you revisit the edit page the html tags are stripped and they have to be added again otherwise the changes made dont stick. I've had to add custom css to override this as the plugin strips the original css to the price and makes it plain default text.

I've been running into the exact same issue. I had something like <del>regular price</del> discounted price. When changing something in the product (e.g. I just changed the product image), the HTML tags which have been working previously are being removed.

I think, either the field shouldn't support HTML tags at all or consistently support them (I prefer the 2nd option). Otherwise it's confusing.