DiviArea.Data.sanitizeId()

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Functions
  6. DiviArea.Data.sanitizeId()
DiviArea.Data.sanitizeId(id, linkPrefix)

Sanitize an area ID string: Return a ID with leading hash.

Params

id
(string, required) The (unsanitized) area ID.
linkPrefix
(string, required) Optional, the linkPrefix to remove from the ID.

Returns

Returns a string that starts with a #, e.g. '#the-area'.

Notes

No notes

Was this article helpful?

Related Articles